forked from csgillespie/efficientR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
24 lines (21 loc) · 688 Bytes
/
deploy.sh
File metadata and controls
24 lines (21 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
set -o errexit -o nounset
BASE_REPO=$PWD
update_website() {
cd ..; mkdir gh-pages; cd gh-pages
git init
git config user.name "Colin Gillespie"
git config user.email "csgillespie@gmail.com"
git config --global push.default simple
git remote add upstream "https://$GH_TOKEN@github.com/csgillespie/efficientR.git"
git fetch upstream 2>err.txt
git checkout gh-pages
cp -fvr $BASE_REPO/_book/* .
git add *.html; git add libs/; git add figures/; git add style.css; git add images/;
git add _main_files/*; git add *.json; git add main.md
git commit -a -m "Updating book (${TRAVIS_BUILD_NUMBER})"
git status
git push 2>err.txt
cd ..
}
update_website