introduced docs auto publish step to travisci

This commit is contained in:
Freddie Ridell
2018-03-29 14:26:45 +01:00
parent e1f105fd8e
commit 492763205b
3 changed files with 34 additions and 1 deletions

23
util/deployGHP.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
make gh-pages
git clone https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} gh-pages-repo
cd gh-pages-repo
git checkout gh-pages
rm -rf *
cp -r ../build/gh-pages/* .
git status
ls
if ! $( git diff-index --quiet HEAD ) ; then
git config user.name "Travis CI"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git add -A .
git commit -m "Deploy to GitHub Pages: ${SHA}"
git push
fi