forked from maxheld83/pensieve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
112 lines (82 loc) · 2.25 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: r
# matrix ====
r:
- oldrel
- release
- devel
os:
- linux
- osx
node_js:
- "lts/*"
matrix:
fast_finish: true
allow_failures:
- os: osx
# general settings ====
warnings_are_errors: false
cache:
packages: yes
directories:
- $HOME/bin
notifications:
email: false
# linux stuff ====
dist: trusty
sudo: false
addons:
apt:
packages:
- pdf2svg
- libudunits2-dev
# macOS stuff ====
disable_homebrew: false
brew_packages:
- openssl
- pandoc
# INSTALL ====
# part of R default
git:
submodules: false
before_install:
- echo -e "machine github.com\n login $GITHUB_PAT" >> ~/.netrc
- git submodule update --init
# SCRIPT ====
# part of r default
# remember that after_success and after_script stages do not fail the build, but before_deploy does, so that is better suited
before_deploy:
- R CMD INSTALL .
- Rscript -e 'covr::codecov()'
- Rscript -e 'pkgdown::build_site()'
- npm install netlify-cli -g
- Rscript -e "devtools::install_github(repo = 'maxheld83/pensieve', force = TRUE, ref = '${TRAVIS_BRANCH}')"
- Rscript -e "rsconnect::setAccountInfo(name='maxheld83', token='${SHINYAPPS_TOKEN}', secret='${SHINYAPPS_SECRET}')"
deploy:
# accio
- provider: script
script: Rscript -e "rsconnect::deployApp(appDir = 'inst/accio/', appName = 'accio')"
skip_cleanup: true
on:
branch: master
condition: "$TRAVIS_OS_NAME = linux && $TRAVIS_R_VERSION_STRING = release"
- provider: script
script: Rscript -e "rsconnect::deployApp(appDir = 'inst/accio/', appName = 'accio-${TRAVIS_BRANCH}')"
skip_cleanup: true
on:
all_branches: true
condition: "$TRAVIS_OS_NAME = linux && $TRAVIS_R_VERSION_STRING = release && $TRAVIS_BRANCH != master"
# _site
- provider: script
script: netlify deploy -s pensieve.netlify.com -t ${NETLIFY_PAT} -e production
skip_cleanup: true
on:
branch: master
condition: "$TRAVIS_OS_NAME = linux && $TRAVIS_R_VERSION_STRING = release"
- provider: pages
github_token: $GITHUB_PAT
local_dir: docs/
skip_cleanup: true
on:
branch: dev
condition: "$TRAVIS_OS_NAME = linux && $TRAVIS_R_VERSION_STRING = release"