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

if [[ "$TRAVIS_BRANCH" == "master" ]]; then
    doxygen ./docs/Doxyfile
    if [ -d "$TRAVIS_BUILD_DIR/html" ]; then
        git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages
        cd YAGE_gh-pages
        git config user.name "TravisBot"
        git config user.email ""
        rm -rf *
        cp -r ../html/* .
        git add -A .
        git commit -m "Rebuilding documentation"
        git push -q origin gh-pages
        cd ..
    fi
fi