name: Deploy docs
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install doc dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build site
run: mkdocs build --strict
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force