Skip to content
Open
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
78 changes: 78 additions & 0 deletions .github/workflows/deploy-docs-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Deploy documentation to GitHub Pages

on:
push:
branches:
- main
paths:
- .github/workflows/deploy-docs-pages.yml
- .readthedocs.yaml
- docs/**
- lib/include/**
pull_request:
paths:
- .github/workflows/deploy-docs-pages.yml
- .readthedocs.yaml
- docs/**
- lib/include/**
workflow_dispatch:

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

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

jobs:
build:
name: Build documentation
runs-on: ubuntu-24.04

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install --yes doxygen graphviz

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r docs/public/requirements.txt

- name: Build Sphinx documentation
run: python -m sphinx -q -b html docs/public docs/public/_build/html

- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: docs/public/_build/html

deploy:
name: Deploy documentation
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-24.04

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading