Skip to content

Commit 82483da

Browse files
committed
Add workflow to publish to github pages.
1 parent 747d295 commit 82483da

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy Sphinx docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
29+
- name: Install docs dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements-docs.txt
33+
34+
- name: Build Sphinx docs
35+
run: |
36+
sphinx-build -M html docs/source docs/build
37+
38+
- name: Configure GitHub Pages
39+
uses: actions/configure-pages@v5
40+
41+
- name: Upload GitHub Pages artifact
42+
uses: actions/upload-pages-artifact@v4
43+
with:
44+
path: docs/build/html
45+
46+
deploy:
47+
needs: build
48+
runs-on: ubuntu-latest
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)