Fix core functionality bugs, arch improvements, add features #46
Workflow file for this run
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: Deploy documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "docs/**" | |
| - "bin/generate_api_docs.py" | |
| - "nrcats/**" | |
| - "CHANGELOG.md" | |
| - "pyproject.toml" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "bin/generate_api_docs.py" | |
| - "nrcats/**" | |
| - "CHANGELOG.md" | |
| - "pyproject.toml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| actions: read # needed by dawidd6/action-download-artifact to query the Actions API | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ── API reference (griffe static analysis; no runtime deps needed) ──── | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install docs dependencies | |
| run: pip install "griffe>=1.0" | |
| - name: Check committed API docs are fresh | |
| if: github.event_name == 'pull_request' | |
| run: python bin/generate_api_docs.py --check | |
| - name: Regenerate API reference | |
| run: python bin/generate_api_docs.py | |
| # Coverage badge is generated by python-test.yml (same commit, separate | |
| # workflow) and fetched here so it deploys atomically with the rest of | |
| # the site — docs.yml owns GitHub Pages and force-orphans it on every | |
| # push, so anything pushed there by another workflow would be wiped. | |
| # Best-effort: if python-test.yml hasn't finished yet, skip rather than | |
| # fail the deploy; the badge catches up on the next push. | |
| - name: Download coverage badge | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| uses: dawidd6/action-download-artifact@v6 | |
| with: | |
| workflow: python-test.yml | |
| name: coverage-badge | |
| commit: ${{ github.sha }} | |
| path: docs/ | |
| if_no_artifact_found: warn | |
| # ── Jekyll build (just-the-docs theme) ──────────────────────────────── | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.2" | |
| bundler-cache: true | |
| working-directory: docs | |
| - name: Build site | |
| working-directory: docs | |
| env: | |
| JEKYLL_ENV: production | |
| run: bundle exec jekyll build --strict_front_matter | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/_site | |
| force_orphan: true |