Skip to content

Commit 378a226

Browse files
committed
docs: docs CI init
1 parent 5df5e4f commit 378a226

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.12"
30+
cache: "pip"
31+
32+
- name: Install Poetry
33+
run: pip install poetry
34+
35+
- name: Install dependencies (with docs)
36+
run: poetry install --with docs
37+
38+
- name: Generate API + copy notebooks
39+
run: poetry run python docs/source/generate_api.py
40+
41+
- name: Build docs (Sphinx)
42+
run: |
43+
poetry run sphinx-build -E -a -b html docs/source docs/build/html
44+
touch docs/build/html/.nojekyll
45+
46+
- name: Upload Pages artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: docs/build/html
50+
51+
deploy:
52+
needs: build
53+
runs-on: ubuntu-latest
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
steps:
58+
- id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)