Skip to content

Commit 52d8111

Browse files
committed
Add GitHub Actions workflow to build docs
1 parent 85b039e commit 52d8111

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-docs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.9'
22+
23+
- name: Install documentation dependencies
24+
run: |
25+
pip install -r docs/requirements.txt
26+
27+
- name: Build HTML
28+
working-directory: docs
29+
run: |
30+
make html
31+
32+
- name: Upload Pages artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: docs/build/html
36+
37+
deploy:
38+
runs-on: ubuntu-latest
39+
needs: build-docs
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)