-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy path.travis.yml
40 lines (36 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
31
32
33
34
35
36
37
38
39
40
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: R
cache:
packages: true
directories:
- .htmlproofer-readme-cache
- .htmlproofer-book-cache
- .htmlproofer-materials-cache
# Install html-proofer
before_install:
- gem install html-proofer
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # Speed up the html-proofer install
script:
# proof README to check links
- Rscript -e "rmarkdown::render('README.md', 'github_document', output_file = 'proof-README.md')"
- tools/_proof.sh --storage-dir .htmlproofer-readme-cache proof-README.html
- rm proof-README.*
# site
# > bookdown
- Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')"
# > conference materials page
- Rscript tools/render-conference-materials.R
# > hosted materials
- cp -r materials _site
# > proof
- htmlproofer --file-ignore /conference-materials/ --storage-dir .htmlproofer-site-cache --timeframe 28d _site
- tools/_proof.sh --storage-dir .htmlproofer-materials-cache _site/conference-materials.html
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_PAT # Set in the settings page of your repository, as a secure variable
local_dir: _site
on:
branch: master