diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2015-12-14 23:33:51 +0400 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2015-12-24 01:52:17 +0400 |
commit | 22b07782ced6503a0bf33f2fe157b70540238f6d (patch) | |
tree | a4f265f9dc32cb313e07323d4ac2e5ac60c24f0b /.ci | |
parent | fc38e6034c76d5450f5398d667184bc3696efcc4 (diff) |
Deploy docs to gh-pages branch from Travis builds
Build docs in Travis and push them to the gh-pages branch, which makes
them available at http://behdad.github.io/harfbuzz/
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/deploy-docs.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.ci/deploy-docs.sh b/.ci/deploy-docs.sh new file mode 100755 index 00000000..8c60a224 --- /dev/null +++ b/.ci/deploy-docs.sh @@ -0,0 +1,25 @@ +set -o errexit -o nounset + +if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" == "gcc" -a "$TRAVIS_PULL_REQUEST" == "false" -a "$TRAVIS_BRANCH" == "master" ] +then + DOCSDIR=build-docs + REVISION=$(git rev-parse --short HEAD) + + rm -rf $DOCSDIR || exit + mkdir $DOCSDIR + cd $DOCSDIR + + cp ../docs/html/* . + + git init + git config user.name "Travis CI" + git config user.email "travis@harfbuzz.org" + git remote add upstream "https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git" + git fetch upstream + git reset upstream/gh-pages + + touch . + git add -A . + git commit -m "Rebuild docs for $REVISION" + git push -q upstream HEAD:gh-pages +fi |