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
50 changes: 50 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Sphinx Documentation

on:
push:
branches: [ "*" ] # Run on every branch
workflow_dispatch:

permissions:
contents: read

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements.txt"

- name: Install documentation requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Build HTML documentation
run: |
make -C docs html

- name: Create dated ZIP file
shell: bash
run: |
DATE="$(date +%Y%m%d)"
ZIPFILE="docs-${DATE}.zip"
cd docs/build/html
# creates docs/build/docs-YYYYMMDD.zip
zip -r "../${ZIPFILE}" .

- name: Upload ZIP artifact
uses: actions/upload-artifact@v4
with:
name: docs-zip-${{ github.ref_name }}
path: docs/build/docs-*.zip
if-no-files-found: error
retention-days: 7