| name: Deploy docs to GitHub Pages |
|
|
| |
| |
|
|
| on: |
| push: |
| branches: |
| - main |
| paths: |
| - "docs/**" |
| - "mkdocs.yml" |
| - "requirements-docs.txt" |
| - ".github/workflows/docs.yml" |
| workflow_dispatch: |
|
|
| env: |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" |
|
|
| |
| permissions: |
| contents: read |
| pages: write |
| id-token: write |
|
|
| |
| concurrency: |
| group: "pages" |
| cancel-in-progress: true |
|
|
| jobs: |
| build: |
| name: Build site |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v5 |
| with: |
| fetch-depth: 0 |
|
|
| - name: Set up Python |
| uses: actions/setup-python@v6 |
| with: |
| python-version: "3.11" |
| cache: "pip" |
| cache-dependency-path: requirements-docs.txt |
|
|
| - name: Install docs dependencies |
| run: | |
| python -m pip install --upgrade pip |
| python -m pip install -r requirements-docs.txt |
| |
| - name: Build site (strict) |
| run: | |
| python -m mkdocs build --strict |
| |
| - name: Upload Pages artifact |
| uses: actions/upload-pages-artifact@v5 |
| with: |
| path: site |
|
|
| deploy: |
| name: Deploy to GitHub Pages |
| needs: build |
| runs-on: ubuntu-latest |
| environment: |
| name: github-pages |
| url: ${{ steps.deployment.outputs.page_url }} |
| steps: |
| - name: Deploy |
| id: deployment |
| uses: actions/deploy-pages@v5 |
|
|