Skip to content

Commit 62ed686

Browse files
committed
Deploy documentation via github actions.
1 parent 78fc1c2 commit 62ed686

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: deploy documentation
2+
3+
on:
4+
push:
5+
branches: [ develop, master ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: setup
13+
uses: actions/setup-python@v2
14+
- name: prerequisites
15+
run: |
16+
python -m pip install --upgrade pip
17+
python -m pip install sphinx
18+
19+
- name: build
20+
run: |
21+
PYTHONPATH=`pwd`/src python -m faber.cli --srcdir=doc --builddir=build
22+
if [ "${BRANCH_NAME}" == develop ]; then
23+
destination_dir=doc/develop/html
24+
else
25+
destination_dir=doc/html
26+
fi
27+
28+
- name: deploy
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: build/html
33+
destination_dir: ${{ env.destination_dir }}
34+
keep_files: true

0 commit comments

Comments
 (0)