Skip to content

Commit 72365f5

Browse files
committed
use travis to build and upload python docs
1 parent 170bb33 commit 72365f5

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.travis.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ addons:
1111
- python3
1212
- python3-pip
1313
- python3-setuptools
14+
- python3-sphinx
1415

1516
matrix:
1617
include:
@@ -35,8 +36,27 @@ before_script:
3536
$CMAKE_ARGS ..
3637

3738
script:
38-
#- make -j2 && ctest -V
39+
# build and run tests
40+
- make -j2 && ctest -V
41+
3942
# install and test python module
40-
- cd .. && rm -rf build
43+
- cd $TRAVIS_BUILD_DIR && rm -rf build
4144
- pip3 install --user --verbose .
4245
- cd python && python3 -m unittest
46+
47+
after_success:
48+
# build docs
49+
- pip3 install --user sphinx-rtd-theme
50+
- cd $TRAVIS_BUILD_DIR/python/docs && make html
51+
- touch _build/html/.nojekyll
52+
53+
deploy:
54+
provider: pages
55+
local_dir: $TRAVIS_BUILD_DIR/python/docs/_build/html/
56+
repo: bingmann/cobs-docs
57+
skip_cleanup: true
58+
github_token: $GITHUB_TOKEN
59+
keep_history: true
60+
on:
61+
branch: master
62+
condition: $BUILD_TYPE = Release

0 commit comments

Comments
 (0)