npdatetime 0.2.4

Astronomical calculator for Bikram Sambat calendar based on solar and lunar positions. High-performance Nepali (Bikram Sambat) datetime library with multi-language bindings
Documentation
name: Documentation

on:
  push:
    branches: [main, master]
  workflow_dispatch:

permissions:
  contents: write

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: 3.x

      - name: Install dependencies
        run: |
          pip install mkdocs-material mkdocs-mermaid2-plugin

      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Build Rust documentation
        env:
          PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
        run: |
          cargo doc --no-deps --all-features
          # Fix for GitHub Pages
          echo '<meta http-equiv="refresh" content="0; url=npdatetime/index.html">' > target/doc/index.html

      - name: Build MkDocs site
        run: mkdocs build

      - name: Merge documentation
        run: |
          mkdir -p site/rustdoc
          cp -r target/doc/* site/rustdoc/

      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./site