Skip to content

Commit 148a302

Browse files
committed
Deploy documentation via github actions.
1 parent 78fc1c2 commit 148a302

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
sudo apt-get install graphviz libgraphviz-dev
17+
python -m pip install --upgrade pip
18+
python -m pip install sphinx sphinx-argparse pygraphviz
19+
20+
- name: build
21+
run: |
22+
PYTHONPATH=`pwd`/src python -m faber.cli --srcdir=doc --builddir=build
23+
if [ "${BRANCH_NAME}" == develop ]; then
24+
echo "destination_dir=doc/develop/html" >> $GITHUB_ENV
25+
else
26+
echo "destination_dir=doc/html" >> $GITHUB_ENV
27+
fi
28+
29+
- name: deploy
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: build/html
34+
destination_dir: ${{ env.destination_dir }}
35+
keep_files: true

0 commit comments

Comments
 (0)