1 #!/bin/bash 2 3 set -x 4 set -o errexit -o nounset 5 6 if test "x$TRAVIS_SECURE_ENV_VARS" != xtrue; then exit; fi 7 8 BRANCH="$TRAVIS_BRANCH" 9 if test "x$BRANCH" != xmaster; then exit; fi 10 11 TAG="$(git describe --exact-match --match "[0-9]*" HEAD 2>/dev/null || true)" 12 13 DOCSDIR=build-docs 14 REVISION=$(git rev-parse --short HEAD) 15 16 rm -rf $DOCSDIR || exit 17 mkdir $DOCSDIR 18 cd $DOCSDIR 19 20 cp ../docs/html/* . 21 #cp ../docs/CNAME . 22 23 git init 24 git config user.name "Travis CI" 25 git config user.email "travis (at] harfbuzz.org" 26 set +x 27 echo "git remote add upstream \"https://\$GH_TOKEN@github.com/harfbuzz/harfbuzz.github.io.git\"" 28 git remote add upstream "https://$GH_TOKEN@github.com/harfbuzz/harfbuzz.github.io.git" 29 set -x 30 git fetch upstream 31 git reset upstream/master 32 33 touch . 34 git add -A . 35 git commit -m "Rebuild docs for https://github.com/harfbuzz/harfbuzz/commit/$REVISION" 36 git push -q upstream HEAD:master 37