Build and publish docs #173
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: Build and publish docs | |
| permissions: | |
| contents: write | |
| on: | |
| workflow_run: | |
| workflows: [Python Tests] | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| jobs: | |
| build-and-publish-docs: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| pyproject-file: pyproject.toml | |
| - name: Build docs | |
| run: | | |
| APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory | |
| uv run --frozen --extra docs pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google | |
| touch docs_build/.nojekyll | |
| - uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: docs_build |