-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (28 loc) · 1.05 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
os: linux
language: python
jobs:
include:
- os: linux
language: python
name: python 3.8
python: 3.8
install:
- python --version
- pip install numpy 'six>=1.13' scipy Pillow
# for docs only
- if [[ "$TRAVIS_OS_NAME" = "linux" && "$TRAVIS_PYTHON_VERSION" == "3.8" ]]; then sudo apt-get install -y pandoc graphviz; pip install sphinx sphinx-gallery pandoc; fi
- python setup.py install
# build doc; set .nojekyll otherwise github.io doesn't copy dirs starting
# with '_' (such as '_static')
- if [[ -n "$GITHUB_ACCESS_TOKEN" ]]; then export PUSH_DOC_TO_GH_PAGES=yes; fi
script:
- if [[ "$TRAVIS_OS_NAME" = "linux" && "$TRAVIS_PYTHON_VERSION" == "3.8" ]]; then cd doc && python -m sphinx -b html source build/html && touch build/html/.nojekyll && cd ..; fi
deploy:
provider: pages
skip_cleanup: true
token: $GITHUB_ACCESS_TOKEN
target_branch: gh-pages
local_dir: doc/build/html
on:
branch: master
condition: $PUSH_DOC_TO_GH_PAGES == yes && $TRAVIS_OS_NAME == linux && $TRAVIS_PYTHON_VERSION == 3.8