forked from kscc25/NEXT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
30 lines (21 loc) · 648 Bytes
/
deploy.sh
File metadata and controls
30 lines (21 loc) · 648 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
#!/bin/bash
set -o errexit -o nounset
if [ "$AUTO_DEPLOY" != "true" ] || [ "$TRAVIS_BRANCH" != "master" ] || [ "$TRAVIS_PULL_REQUEST" == "true" ]
then
echo "No deploy for this build!"
exit 0
fi
rev=$(git rev-parse --short HEAD)
cd build
sed -i "s/localhost:8080/snsa.github.io\/NEXT/g" index.html
cp ../userscripts/next.chrome.user.js .
git init
git config user.name "SNSA Bot"
git config user.email "heroandtn3@gmail.com"
git remote add upstream "https://$GH_TOKEN@github.com/SNSA/NEXT.git"
git fetch upstream
git reset upstream/gh-pages
touch .
git add -A .
git commit -m "rebuild pages at ${rev}"
git push -q upstream HEAD:gh-pages