diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rwxr-xr-x | scripts/update_docs | 26 |
2 files changed, 15 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index 333ebe7c..64b4afbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ before_install: - sudo apt-get install -y libglm-dev - sudo apt-get install -y xorg-dev - sudo apt-get install -y libglu1-mesa-dev +- sudo apt-get install -y doxygen script: - cd $TRAVIS_BUILD_DIR - mkdir -p build diff --git a/scripts/update_docs b/scripts/update_docs index 6993184e..19e47145 100755 --- a/scripts/update_docs +++ b/scripts/update_docs @@ -2,16 +2,18 @@ if [[ "$TRAVIS_BRANCH" == "master" ]]; then doxygen ./docs/Doxyfile - cd html - git init - git config user.name "TravisBot" - git config user.email "" - git remote add upstream "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" - git fetch upstream - git reset upstream/gh-pages - touch . - git add -A . - git commit -m "Rebuilding documentation" - git push -q upstream HEAD:gh-pages - cd .. + if [ -d "$TRAVIS_BUILD_DIR/html" ]; then + cd $TRAVIS_BUILD_DIR/html + git init + git config user.name "TravisBot" + git config user.email "" + git remote add upstream "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" + git fetch upstream + git reset upstream/gh-pages + touch . + git add -A . + git commit -m "Rebuilding documentation" + git push -q upstream HEAD:gh-pages + cd .. + fi fi |