Skip to content

Commit 63ea53f

Browse files
committed
ci: Add documentation workflow
Build the documentation as part of CI. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 80380ef commit 63ea53f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build documentation
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
# Cancel ongoing builds on new changes
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Run tasks
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
with:
21+
persist-credentials: false
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
25+
with:
26+
python-version: "3.14"
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7.0
30+
with:
31+
enable-cache: true
32+
33+
- name: Install dependencies
34+
run: uv sync --frozen --group docs
35+
36+
- name: Build documentation
37+
run: uv run poe build-docs
38+
39+
- name: Upload artifacts
40+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
41+
with:
42+
path: doc/_build
43+
include-hidden-files: true

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ pythonpath = "src"
124124
cmd = "python -m pytest -W error"
125125
env = {PYTHONIOENCODING = "utf-8"}
126126

127+
[tool.poe.tasks.build-docs]
128+
cmd = "sphinx-build -M html . _build"
129+
cwd = "./doc"
127130

128131
[tool.poe.tasks]
129132
lint = "ruff check ."

0 commit comments

Comments
 (0)