-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 997 Bytes
/
docs_preview.yml
File metadata and controls
43 lines (34 loc) · 997 Bytes
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
name: Docs Preview
on:
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: "pip"
- name: Install Poetry
run: pip install poetry
- name: Install dependencies (with docs)
run: poetry install --with docs
- name: Generate API + copy notebooks
run: poetry run python docs/source/generate_api.py
- name: Build docs (Sphinx)
run: |
poetry run sphinx-build -E -a -b html docs/source docs/build/html
touch docs/build/html/.nojekyll
- name: Upload docs preview artifact
uses: actions/upload-artifact@v7
with:
name: docs-html-preview
path: docs/build/html
retention-days: 7