Skip to content

Commit c6b59ca

Browse files
committed
Add docs build CI workflow
Adds a GitHub Actions workflow to build Sphinx documentation on pushes to main and PRs that touch the doc/ directory. Uses uv sync --group=docs consistent with existing CI patterns, and uploads the built HTML as an artifact for review. Sets READTHEDOCS=True to skip cookbook script execution that requires data files not available in CI.
1 parent 6958c06 commit c6b59ca

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "doc/**"
9+
- "pyproject.toml"
10+
pull_request:
11+
paths:
12+
- "doc/**"
13+
workflow_dispatch:
14+
15+
permissions: {}
16+
17+
jobs:
18+
build-docs:
19+
name: Build Sphinx docs
20+
runs-on: ubuntu-latest
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
env:
27+
READTHEDOCS: "True"
28+
29+
steps:
30+
- name: Checkout repo
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32+
with:
33+
persist-credentials: false
34+
35+
- name: Set up uv
36+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
37+
with:
38+
version: ">=0.9.11,<0.10.0"
39+
python-version: "3.12"
40+
prune-cache: false
41+
42+
- name: Install pandoc
43+
run: sudo apt-get update && sudo apt-get install -y pandoc
44+
45+
- name: Install dependencies
46+
run: uv sync --group=docs
47+
48+
- name: Build HTML docs
49+
run: |
50+
cd doc
51+
uv run make html
52+
53+
- name: Upload built docs
54+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
55+
with:
56+
name: yt-docs-html
57+
path: doc/build/html/

0 commit comments

Comments
 (0)