Skip to content

Commit 108c93f

Browse files
committed
Deploy documentation via github actions.
1 parent 3dd6bcf commit 108c93f

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.ci/faber

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# -*- python -*-
2+
3+
from faber.tools.boost import boostbook
14
from faber.tools.python import python
25

6+
bb = boostbook(prefix='/usr/share/boostbook')
37
p = python(command='$PYTHON')
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: deploy documentation
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: setup
11+
run: |
12+
sudo apt-get update
13+
sudo apt-get install \
14+
libboost1.71-tools-dev \
15+
python3 \
16+
python3-numpy \
17+
python3-sphinx \
18+
xsltproc \
19+
docbook-xsl
20+
sudo python3 -m pip install --upgrade pip
21+
sudo python3 -m pip install faber
22+
- name: build
23+
run: |
24+
sed -e "s/\$PYTHON/python3/g" .ci/faber > ~/.faber
25+
faber --builddir=build doc.html
26+
if [ "${GITHUB_REF##*/}" == master ]; then
27+
echo "destination_dir=doc/html" >> $GITHUB_ENV
28+
else
29+
echo "destination_dir=doc/develop/html" >> $GITHUB_ENV
30+
fi
31+
- name: deploy
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: build/doc/html
36+
destination_dir: ${{ env.destination_dir }}
37+
keep_files: true

0 commit comments

Comments
 (0)