Skip to content

Commit ab5c1e0

Browse files
committed
gha: build and publish docs
1 parent 551989c commit ab5c1e0

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build docs
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.8'
17+
18+
- name: Build
19+
run: |
20+
pip install -U -r docs/requirements.txt
21+
sphinx-build docs dist/site -b dirhtml -a
22+
23+
- name: Publish
24+
if: ${{ github.event_name == 'push' && github.ref_name == "master" }}
25+
uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: dist/site

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx
2+
furo

0 commit comments

Comments
 (0)