diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..21890be --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: bash +sudo: required +dist: trusty + +notifications: + - email: false + +addons: + apt: + packages: + - texinfo + +script: + +after_success: + - bash ci-doc-gh-pages.sh diff --git a/ci-doc-gh-pages.sh b/ci-doc-gh-pages.sh new file mode 100644 index 0000000..9e7ae0f --- /dev/null +++ b/ci-doc-gh-pages.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -o errexit -o nounset + +if [ "$TRAVIS_BRANCH" != "master" ] +then + echo "This commit was made against the $TRAVIS_BRANCH and not the master! No deploy!" + exit 0 +fi + +rev=$(git rev-parse --short HEAD) + +mkdir -p stage/_book + +command -v texi2any >/dev/null 2>&1 || { echo >&2 "texi2any is required but it's not installed. Aborting."; exit 1; } +texi2any --html manual/clx.texinfo -o stage/_book + +cd stage/_book + +git init +git config user.name "Documentation Bot" +git config user.email "Bender@future.com" + +git remote add upstream "https://$GH_TOKEN@github.com/PuercoPop/clx-manual-ci-test.git" +git fetch upstream +git reset upstream/gh-pages + +touch . +git add -A . +git commit -m "rebuild pages at ${rev}" +git push -q upstream HEAD:gh-pages