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