-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy path.travis.yml
51 lines (45 loc) · 1.45 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
language: r
dist: xenial
r:
- 3.4
- 3.5
- 3.6
env:
matrix:
- R_PKG="$(basename $TRAVIS_REPO_SLUG)"
global:
- secure: "CwEV0N2IeRQBqD7T6uiZmqpw4orE34RDSsouoqmbyb1mWDFYXXPYofdb67YgGXchcgtlC90VhtVVJ2ea57wXpumHebFjPG5lp1OJm3S4p4O1iXiTS/33PE7sLUkotzL2aOiI5p/yYQfoF9uFoO6dFuxWxFTa0oU8OnAB46YoLWA="
install:
- # "wget -q -O - http://yihui.name/xran/r-config | bash"
- Rscript -e "if (!require('devtools')) install.packages('devtools')"
- Rscript -e "if (!require('plyr')) install.packages('plyr')"
cache:
directories:
- $HOME/R
script:
- # docs
- # git checkout dev
- pwd
- cd ./docs
- Rscript -e "install.packages('bookdown')"
- Rscript -e "devtools::install_github('cosname/recharts')"
- Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')"
- git config --global user.email "[email protected]"
- git config --global user.name "Dawei Lang"
- git clone -b gh-pages https://${GITHUB_PAT}@github.com/cosname/recharts.git book-output
- cd book-output
- cp -r ../_book/* ./
- git add --all *
- git commit -m"Update the book" || true
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git push -q origin gh-pages; fi'
- cd ../..
- # buid & check
- Rscript -e "devtools::install_deps(dep = TRUE)"
- cd ..; rm -f *.tar.gz; R CMD build $R_PKG
- R CMD check $R_PKG*.tar.gz --no-manual
- cd $R_PKG
# deploy to XRAN
after_success:
- # set -e
- # "(wget -q -O - http://yihui.name/xran/r-xran | bash)"
- pwd