forked from jennybc/happy-git-with-r
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
34 lines (30 loc) · 809 Bytes
/
.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
language: r
sudo: false
cache:
packages: true
directories:
- $HOME/.npm
before_install:
- nvm install stable
- npm install netlify-cli -g
- export COMMIT_MSG=$(git log -1 --format='%h %<(50,trunc)%s')
- echo $COMMIT_MSG
- export DEPLOY_MSG=${COMMIT_MSG//[\'\"\`]/}
- echo $DEPLOY_MSG
env:
- NETLIFY_SITE_ID=4e9fea2e-d99c-484e-be1a-9d8605393f4e
# NETLIFY_AUTH_TOKEN set in travis settings
script:
- Rscript -e 'bookdown::render_book("index.Rmd")'
deploy:
- provider: script
script: netlify deploy --dir _book --prod --message "$DEPLOY_MSG"
skip_cleanup: true
on:
branch: master
- provider: script
script: netlify deploy --dir _book --message "$DEPLOY_MSG"
skip_cleanup: true
on:
all_branches: true
condition: $TRAVIS_BRANCH != "master"