]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | if [ ! -f .deploy-key ]; then exit; fi | |
4 | if [ -z "$TRAVIS_BRANCH" ]; then exit; fi | |
5 | ||
6 | BRANCH_DIR="$TRAVIS_BRANCH" | |
7 | ||
8 | if [ "$TRAVIS_PULL_REQUEST" != false ]; then | |
9 | if [ "$TRAVIS_BRANCH" != master ]; then exit; fi | |
10 | ||
11 | BRANCH_DIR="pull-$TRAVIS_PULL_REQUEST" | |
12 | fi | |
13 | ||
14 | export SSH_KEYFILE="$(readlink -f .deploy-key)" | |
15 | export GIT_SSH="$(readlink -f ssh.sh)" | |
16 | git clone -b gh-pages git@github.com:freenode/web-7.0.git .deploy || exit 1 | |
17 | cd .deploy || exit 1 | |
18 | git config user.name travis | |
19 | git config user.email travis@nowhere | |
20 | git rm -r "$BRANCH_DIR/*" | |
21 | mkdir -p "$BRANCH_DIR" | |
22 | cd "$BRANCH_DIR" || exit 1 | |
23 | cp -r ../../out/* . | |
24 | git add -A | |
25 | git commit -m "travis: $TRAVIS_COMMIT" | |
26 | git push || exit 1 |