-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
49 lines (40 loc) · 1.1 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
48
# Thanks to jtilly (https://github.com/jtilly/R-travis-container-example/blob/master/.travis.yml)
language: r
pandoc_version: 2.2.1
dist: trusty
sudo: false
branches:
only:
- master
# cache local packages
cache: packages
# install required latex packages (if needed)
#before_install:
# - tlmgr install bbm
# install the package and dependencies:
# - update all installed packages
# - install package with dependencies
install:
- Rscript -e 'update.packages(ask = FALSE)'
- Rscript -e 'devtools::install(pkg = ".", dependencies = TRUE)'
# Build and check package
script:
- R CMD build . --no-build-vignettes --no-manual
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
- travis_wait Rscript -e "pkgdown::build_site()"
# deploy site to gh-pages branch
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master
local_dir: docs
keep-history: true
allow-empty-commit: false
# send email if any changes
notifications:
email:
on_success: change
on_failure: change