-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.27 KB
/
documentation.yml
File metadata and controls
47 lines (45 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: documentation
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
doctest:
name: Test if documentation can be rendered
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras
- name: Run doctest
run: uv run sphinx-build -b doctest doc .
docdeploy:
name: Render the documentation and push it to gh-pages
runs-on: ubuntu-latest
needs: doctest
if: ${{github.ref == 'refs/heads/main'}}
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --extra doc
- name: Sphinx build
run: uv run sphinx-build doc _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true