refactor: rename Django app from npdatetime_django to npdt and up…
#41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |