Skip to content

Commit

Permalink
if this works, it will be a miracle
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Jun 20, 2016
1 parent 3837cad commit 5013480
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .travis.yml
@@ -0,0 +1,14 @@
language: r
cache: packages
sudo: false
before_script:
- chmod +x ./_build.sh
- chmod +x ./_deploy.sh
script:
- ./_build.sh
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash
_deploy.sh
env:
global:
secure: IjJ5v+fiPiRYgmU1OSazwO7DNYqdg8x5u6rwWW27HOhJfpo3z+I6SwoEUe0qzd+WlPGC91XB8b9rXENfbCKpbITYIhhn3eqL0ARBwMsaalGr9z8Tid1wc+/QfaiRDJBGfzRdqpkepOpuR/ikliXBLbWu42MFxc/6VxX0F+mGjxlyVIOdvN5v4gwHz9/b7YCROheud5/B4ESaEUbQX2Cv22djTUECpMjAd6IpmCUMMm4jpdAZDRPbPaLIzEw1ftTdBM3xRI2B2c9Y9ok3teTViP45+Uh/+QWVVzLw0m53gTo5qo1T73MCc+QRtuFg4X5CjyG7K75nmSTkU4rFzDWmhj8WH/iYnB7lK4G+4FS4yY8qoNk2L5cX+wmpkT6L0JinLvfHZrlAXc5Q+OfNUjvJhcU4VARGbcNhCkyCeM5XrmQDWjIp4uwXNlf26IujVwt0wYTEhxQiGhRsZFqR24/9L3wP4RZ3h4SvC1IOxac4h+I3pCRXsdiq1/wIgtkYBWMA5yy8cRdkP94pTozkUhzQZrRCPPfWxfclQHa6pM44ZEzX0Ya/BA6WNsm8gNOpttiftVJrrFogajgd0vcQLdfemijaIpUggK74K4vtf13U66rX3qTUY5h9/lpsqoZdv217JYZMt+c+3XrJDONvDBPSO0gx7TKMpPfneU/BHTQRcZ8=
2 changes: 1 addition & 1 deletion 16_more-content.Rmd
Expand Up @@ -2,4 +2,4 @@

# More content

more stuff *coming soon* ... really!
more stuff *coming soon* ... really!!
4 changes: 4 additions & 0 deletions _build.sh
@@ -0,0 +1,4 @@
#!/usr/bin/env Rscript

bookdown::render_book("index.Rmd", "bookdown::gitbook")
bookdown::render_book("index.Rmd", "bookdown::pdf_book")
19 changes: 19 additions & 0 deletions _deploy.sh
@@ -0,0 +1,19 @@
# Set git config information
git config --global user.name "Jenny Bryan (Travis-CI)"
git config --global user.email "jenny@stat.ubc.ca"

# Clone the gh-pages repository
git clone -b gh-pages \
https://${HAPPY_GIT}@github.com/${TRAVIS_REPO_SLUG}.git \
book-output

# Change to the gh-page clone book-output directory
cd book-output

# Copy generated output to book-output
cp -r ../_book/* ./

# Add all files to the repo
git add *
git commit -a -m "Updating book (${TRAVIS_BUILD_NUMBER})"
git push origin gh-pages

0 comments on commit 5013480

Please sign in to comment.