docs: Use Zensical support for mkdocs-autoapi to auto-generate API documentation
#704
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| env: | |
| FORCE_COLOR: 1 | |
| UV_NO_SYNC: 1 | |
| permissions: | |
| contents: read # for checkout | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-docs: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: false | |
| - name: Build documentation | |
| run: uvx --with tox-uv tox -e docs | |
| - name: Check for uncommitted autogenerated docs | |
| run: git diff --exit-code docs | |
| - name: Upload documentation as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: site | |
| publish-docs: | |
| name: Publish | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| needs: [ build-docs ] | |
| permissions: | |
| pages: write # for deploy-pages | |
| id-token: write # for deploy-pages OIDC authentication | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| if: ${{ github.event_name == 'release' }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |