-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathwercker.yml
More file actions
42 lines (38 loc) · 1.4 KB
/
wercker.yml
File metadata and controls
42 lines (38 loc) · 1.4 KB
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
box: rocker/verse
build:
steps:
- script:
name: Fixes
code: |
mkdir ~/.R
echo "CXXFLAGS=`R CMD config CXXFLAGS` -Wno-ignored-attributes" > ~/.R/Makevars
- script:
name: Install Packages
code: |
apt-get update -q
apt-get install -y jags
install2.r -d TRUE -e BAS
installGithub.r StatsWithR/statsr
install2.r packrat
install2.r `Rscript -e "cat(paste( setdiff( packrat:::dirDependencies('.'), row.names(installed.packages()) ), collapse=' '))"`
- script:
name: Render Book (html)
code: |
Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')"
- script:
name: Render Book (pdf)
code: |
Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::pdf_book')"
- script:
name: Publish book
code: |
if [[ "$WERCKER_GIT_BRANCH" = "master" ]]; then
git config --global user.name "statswithr-bots"
git config --global user.email "statswithr.bot@gmail.com"
git clone -b gh-pages https://${GITHUB_TOKEN}@github.com/StatsWithR/book.git book-output
cd book-output
cp -r ../_book/* ./
git add .
git commit -a -m "Updating book"
git push -q origin gh-pages
fi