forked from nuprl/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·33 lines (29 loc) · 747 Bytes
/
deploy.sh
File metadata and controls
executable file
·33 lines (29 loc) · 747 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
#!/bin/bash
set -e
tee ~/.netrc > /dev/null <<EOF
machine github.com
login prl-bot
password $GH_TOKEN
EOF
git remote add deploy https://github.com/nuprl/nuprl.github.io.git
git config --global user.email "dbp@ccs.neu.edu"
git config --global user.name "PRL Bot"
REV="** deploy nuprl/website@$TRAVIS_COMMIT"
git fetch deploy
git reset --soft deploy/master
git checkout HEAD -- README.md
git checkout HEAD -- .gitignore
git checkout HEAD -- blog/.gitignore
git add .
git status
git commit --allow-empty -m "$REV"
git fetch origin
CURRENT_HEAD=`git rev-parse origin/master`
if [ "$TRAVIS_COMMIT" = "$CURRENT_HEAD" ]
then
echo "Committing..."
git push deploy HEAD:refs/heads/master
else
echo "Aborting; detected race..."
exit 1
fi