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