Skip to content

Build and publish docs #6

Build and publish docs

Build and publish docs #6

Workflow file for this run

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
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install poetry
poetry install -E docs
- name: Build docs
run: |
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
poetry run 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