-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- *should* work now - exposed token should be resolved - better informational printing and error notifications - .travis.yml updated under the assumption that @szaghi moved to web interface for encrypted variables - removed empty .gitignore added when demonstrating security breach
- Loading branch information
Showing
2 changed files
with
12 additions
and
12 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
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 |
---|---|---|
@@ -1,18 +1,19 @@ | ||
#!/bin/bash | ||
set -ev # echo what we're doing and fail on errors | ||
GITREPO=$1 | ||
FoBiS.py rule -ex makedoc | ||
git config --global user.name "Stefano Zaghi" | ||
git config --global user.email "stefano.zaghi@gmail.com" | ||
if [[ "${TRAVIS}" = "true" && "${TRAVIS_PULL_REQUEST}" != "false" ]]; then | ||
# Running under travis during a PR. No access to GH_TOKEN so abort | ||
# documentation deployment, without throwing an error | ||
FoBiS.py rule -ex makedoc | ||
exit 0 | ||
else | ||
# either we are not on TRAVIS and maybe you want to manually dpeloy documentation | ||
# or we are on TRAVIS but not testing a PR so it is safe to deploy documentation | ||
git config --global user.name "Stefano Zaghi" | ||
git config --global user.email "stefano.zaghi@gmail.com" | ||
git clone --branch=gh-pages https://${GH_TOKEN}@github.com/szaghi/$GITREPO doc/html | ||
cd doc/html | ||
git add -f --all * | ||
git commit -m "Travis CI autocommit from travis build ${TRAVIS_BUILD_NUMBER}" | ||
git push -f origin gh-pages | ||
fi | ||
# either we are not on TRAVIS and maybe you want to manually dpeloy documentation | ||
# or we are on TRAVIS but not testing a PR so it is safe to deploy documentation | ||
git clone --branch=gh-pages https://${GH_TOKEN}@github.com/szaghi/$GITREPO doc/html | ||
FoBiS.py rule -ex makedoc | ||
cd doc/html | ||
git add -f --all './*' | ||
git commit -m "Travis CI autocommit from travis build ${TRAVIS_BUILD_NUMBER}" | ||
git push -f origin gh-pages |