name: Deploy Docs on: push: branches: - main paths: - docs/** - mkdocs.yml - requirements-docs.txt - .github/workflows/pages.yml # Called by release-please.yml once main has been fast-forwarded onto a # release. That push is made with GITHUB_TOKEN and so triggers nothing itself. workflow_call: workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: github-pages cancel-in-progress: true jobs: build: # Pinned: the ubuntu-latest label moves to Ubuntu 26 on 2026-10-19, # and a release should not change runner images by surprise. runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v7 - name: Set up Python uses: actions/setup-python@v7 with: python-version: '3.12' cache: pip cache-dependency-path: requirements-docs.txt - name: Configure Pages uses: actions/configure-pages@v6 - name: Install docs dependencies run: python -m pip install -r requirements-docs.txt - name: Build site run: python -m mkdocs build --strict - name: Upload Pages artifact uses: actions/upload-pages-artifact@v5 with: path: site deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-24.04 needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v5