forked from nightscout/nightscout.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·35 lines (32 loc) · 777 Bytes
/
build.sh
File metadata and controls
executable file
·35 lines (32 loc) · 777 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
25
26
27
28
29
30
31
32
33
34
35
#! /bin/bash -eu
rm -Rf out
# mkdir out
export GIT_EMAIL=$GIT_EMAIL
export GIT_NAME=$GIT_NAME
GIT_REMOTE=$(git config remote.origin.url)
export NEW_REMOTE="https://${GH_TOKEN}@github.com/${GH_REPO}.git"
( git clone -q -b master "$NEW_REMOTE" out ) 2>&1 > /dev/null
ls out
(
cd out;
git rm -r -q ./*
ls
)
./node_modules/.bin/docpad generate --env static
msg="build from $(git rev-parse HEAD)"
(
cd out;
cp ../master.travis .travis.yml
# cp ../CNAME CNAME
touch .nojekyll
git config --local user.email "$GIT_EMAIL"
git config --local user.name "$GIT_NAME"
git add .
git add .travis.yml
git add .nojekyll
git status
git commit -avm "$msg"
# gh-pages uses master branch on user/org repos
( git push -q origin master:master
) 2>&1 > /dev/null
)