-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Travis to publish manual on gh-pages
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 "[email protected]" | ||
|
||
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 |