-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
39 lines (39 loc) · 2.2 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
33
34
35
36
37
38
39
os: linux
language: python
install:
- sudo apt-get -qq update && sudo apt-get install -y --no-install-recommends texlive-latex-extra texlive-latex-recommended texlive-pictures latexmk pgf
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda env create -f binder/environment.yml
- source $(conda info --root)/etc/profile.d/conda.sh
- source activate book
before_script:
- git config --global user.email ${GH_EMAIL}
- git config --global user.name ${GH_NAME}
- cd $HOME
- git clone --quiet --branch=master https://${GH_TOKEN}@github.com/johnfoster-pge-utexas/numerical-methods-book.git > /dev/null
- git clone --quiet --branch=master https://${GH_TOKEN}@github.com/daytum/book.git daytum-book > /dev/null
- cd $TRAVIS_BUILD_DIR
- echo `git diff-tree --diff-filter=AM --no-commit-id --name-only -r ${TRAVIS_COMMIT}`
- git diff-tree --diff-filter=AM --no-commit-id --name-only -r ${TRAVIS_COMMIT} | grep -i -E "ipynb|datasets|images" 1> changed_files.txt || true
- python convert.py --dir=$HOME/numerical-methods-book/content changed_files.txt
- python convert.py --daytum --dir=$HOME/daytum-book/content changed_files.txt
script:
- (cd $HOME/numerical-methods-book && jupyter-book build . --execute --overwrite)
- (cd $HOME/daytum-book && jupyter-book build . --execute --overwrite)
after_success:
- cd $HOME/numerical-methods-book
- git add -A
- git commit -m "Travis CI autocommit from travis build $TRAVIS_BUILD_NUMBER"
- git push -fq origin master > /dev/null
- cd $HOME/daytum-book
- git add -A
- git commit -m "Travis CI autocommit from travis build $TRAVIS_BUILD_NUMBER"
- git push -fq origin master > /dev/null
# - bash $HOME/build/johntfoster/numerical_methods_book/binder/trigger_binder.sh https://gke.mybinder.org/build/gh/johntfoster/numerical_methods_book/"${TRAVIS_BRANCH}"
# - bash $HOME/build/johntfoster/numerical_methods_book/binder/trigger_binder.sh https://ovh.mybinder.org/build/gh/johntfoster/numerical_methods_book/"${TRAVIS_BRANCH}"