Skip to content

Commit 10ee44d

Browse files
committed
add deployment script
1 parent b406544 commit 10ee44d

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/docs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- "src/**"
10+
- "example/**"
11+
- "pyproject.toml"
12+
- "setup.py"
13+
- "README.md"
14+
- "VERSION"
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: true
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.11"
37+
cache: "pip"
38+
39+
- name: Install package + doc dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
python -m pip install ".[docs]"
43+
44+
- name: Build Sphinx HTML
45+
run: |
46+
make -C docs html
47+
48+
- name: Upload Pages artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: docs/_build/html
52+
53+
deploy:
54+
needs: build
55+
runs-on: ubuntu-latest
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)