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