aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/update_docs
blob: 19e47145dc6fe81f677d2b851316547fd3457d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

if [[ "$TRAVIS_BRANCH" == "master" ]]; then
    doxygen ./docs/Doxyfile
    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