]> jfr.im git - irc/freenode/web-7.0.git/blame - deploy.sh
Merge pull request #120 from freenode/revert
[irc/freenode/web-7.0.git] / deploy.sh
CommitLineData
abe76b1b
EK
1#!/bin/sh
2
f5d24ac2 3if [ ! -f .deploy-key ]; then exit; fi
abe76b1b 4if [ -z "$TRAVIS_BRANCH" ]; then exit; fi
f5d24ac2
EK
5
6BRANCH_DIR="$TRAVIS_BRANCH"
7
8if [ "$TRAVIS_PULL_REQUEST" != false ]; then
9 if [ "$TRAVIS_BRANCH" != master ]; then exit; fi
10
11 BRANCH_DIR="pull-$TRAVIS_PULL_REQUEST"
12fi
abe76b1b 13
17465a30
EK
14export SSH_KEYFILE="$(readlink -f .deploy-key)"
15export GIT_SSH="$(readlink -f ssh.sh)"
229d8614
EK
16git clone -b gh-pages git@github.com:freenode/web-7.0.git .deploy || exit 1
17cd .deploy || exit 1
358f0502
EK
18git config user.name travis
19git config user.email travis@nowhere
69cde0fe 20git rm -r "$BRANCH_DIR/*"
f5d24ac2
EK
21mkdir -p "$BRANCH_DIR"
22cd "$BRANCH_DIR" || exit 1
f5d24ac2 23cp -r ../../out/* .
abe76b1b
EK
24git add -A
25git commit -m "travis: $TRAVIS_COMMIT"
229d8614 26git push || exit 1