Skip to content

Add approval gates

Add approval gates #99

Workflow file for this run

# Copyright (C) 2026 Marco Fortina
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Publish documentation
on:
push:
branches: [master, main]
paths:
- docs/**
- mkdocs.yml
- pyproject.toml
- src/**
- .github/workflows/docs.yml
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
NO_MKDOCS_2_WARNING: "1"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements-docs.txt
- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[docs]'
- name: Configure GitHub Pages
uses: actions/configure-pages@v6
with:
enablement: true
- name: Build documentation
run: |
mkdocs build --strict --site-dir site
touch site/.nojekyll
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5