-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
47 lines (38 loc) · 1.52 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
40
41
42
43
44
45
46
47
# This configuration file will make Travis CI compile our PDF and force-push it
# back to the repository.
# This *wonderful* hack is credited to Dan Foreman-Mackey (GitHub: @dfm / Twitter: @exoplaneteer)
# and David W. Hogg (GitHub/Twitter: @davidwhogg) on the repository:
# https://github.com/davidwhogg/mcmc/
# This hack has been modified slightly to push pdfs to <branch>-pdf
sudo: true
language: python
env:
matrix:
- PYTHON_VERSION=3.6
install:
- wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu
- sudo ./install-tl-ubuntu
- sudo /opt/texbin/tlmgr init-usertree
- sudo /opt/texbin/tlmgr update --all
- sudo /opt/texbin/tlmgr update unicode-math
- sudo /opt/texbin/tlmgr update xetex
- "export PATH=$PATH:/opt/texbin"
script:
- git config --get remote.origin.url
- make
after_success: |
if [[ "$PYTHON_VERSION" == "3.6" ]] && [ -n "$GITHUB_API_KEY" ]; then
# make sure we are in the parent directory of the repository
cd $TRAVIS_BUILD_DIR
git checkout --orphan $TRAVIS_BRANCH-pdf
git rm -rf .
# Re-name the PDF so that the filename is searchable when it is downloaded
mv cv.pdf andrew-casey-cv.pdf
git add -f andrew-casey-cv.pdf
git -c user.name='travis' -c user.email='travis' commit -m init
git push -q -f https://andycasey:[email protected]/$TRAVIS_REPO_SLUG $TRAVIS_BRANCH-pdf
fi
notifications:
email:
on_success: change
on_failure: always