59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
name: Publish documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- gh-pages
|
|
paths:
|
|
- "docs/**"
|
|
- "mkdocs.yml"
|
|
- ".github/workflows/docs-pages.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
- name: Checkout documentation source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.x"
|
|
cache: pip
|
|
cache-dependency-path: docs/requirements.txt
|
|
|
|
- name: Install MkDocs dependencies
|
|
run: python -m pip install -r docs/requirements.txt
|
|
|
|
- name: Build documentation
|
|
# The repository intentionally links some docs to source files outside
|
|
# docs/. MkDocs reports those as warnings, but they must not block Pages.
|
|
run: mkdocs build
|
|
|
|
- name: Configure GitHub Pages
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: site
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|