Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 50 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,68 @@ name: Docs
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'README.md'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'README.md'
- '.github/workflows/docs.yml'
workflow_dispatch:

permissions:
contents: write
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
name: Build and deploy MkDocs
build:
name: Build MkDocs site
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'

- name: Install MkDocs Material
run: pip install mkdocs-material
run: |
set -euo pipefail
python3 -m pip install --upgrade pip
python3 -m pip install mkdocs mkdocs-material

- name: Build site (strict)
run: mkdocs build --strict --site-dir site

- name: Build (strict)
run: mkdocs build --strict
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site

deploy:
name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
Loading