Skip to content

Commit f9d0603

Browse files
committed
docs: docs CI init
1 parent c7e69b4 commit f9d0603

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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: Build docs (Sphinx)
39+
run: |
40+
poetry run sphinx-build -E -a -b html docs/source docs/build/html
41+
touch docs/build/html/.nojekyll
42+
43+
- name: Upload Pages artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: docs/build/html
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
steps:
55+
- id: deployment
56+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)