-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
30 lines (26 loc) · 1.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
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: R
latex: false # installing missing packages does not work well with default tex distribution
sudo: false
cache:
packages: true
before_install:
# decrypt and install commercial fonts needed to build the pdf
- openssl aes-256-cbc -K $encrypted_b52386f09d9a_key -iv $encrypted_b52386f09d9a_iv -in tex/fonts.tar.enc -out fonts.tar -d # decrypt
- tar xvf fonts.tar # unzip
- mkdir $HOME/.fonts # create directory where latex can find the fonts
- cp -a $TRAVIS_BUILD_DIR/fonts/. $HOME/.fonts/ # copy the font files
- fc-cache -f -v # build font info
# use tinytex instead of default tex distribution
- Rscript -e 'tinytex::install_tinytex()'
- Rscript -e 'tinytex::tlmgr_install("hyphen-dutch")' # only package tinytex will not auto-detect as missing
script:
- Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")' # build the pdf
- Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")' # run html last, so it can link to the pdf file
deploy:
provider: pages
local_dir: _book
skip_cleanup: true
keep-history: true
github_token: $GITHUB_TOKEN
target_branch: gh-pages