Skip to content

Commit 35f5f60

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

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/docs.yml

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