TRAVIS: try to set up github gh pages hook

This commit is contained in:
hasufell 2014-06-08 23:21:58 +02:00
parent ad26c67f3d
commit bc76cb2f26
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
2 changed files with 34 additions and 0 deletions

View File

@ -1,5 +1,8 @@
language: c
compiler: clang
env:
global:
secure: "BB9eiRNXC1PfNRLEifc0yQQZnM25zqaWNGVWN+atzT+NkxhVKyVr8+DoyPYaa8tOKybuSZhVkKnIiCd8iGMe3v+WyuHKFuhdiwdnEQhxbBlUCb9dDLEexI+J8QiYwC8AW/t6H9LWVwSka0RI3GJujJ8HKIBzW45I/j+1NlUte8U="
before_script:
- sudo apt-get install -qq libgmp-dev libmpfr-dev
- wget http://www.flintlib.org/flint-2.4.3.tar.gz
@ -11,3 +14,6 @@ before_script:
- cd ..
script:
- make CC=clang
- make doc
after_script:
- ./update-gh-pages.sh

28
update-gh-pages.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
cd "$HOME"
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git clone --branch=gh-pages https://${GH_TOKEN}@github.com/hasufell/pqc gh-pages || exit 1
# C docs
cd gh-pages || exit 1
echo "Removing old C docs."
git rm -rf .
echo "Adding new C docs."
cp -rf "$TRAVIS_BUILD_DIR"/doxygen/html/* . || exit 1
git add *
if [[ -e ./index.html ]] ; then
echo "Commiting docs."
git commit -m "Lastest doxygen docs updated
travis build: $TRAVIS_BUILD_NUMBER
commit: $TRAVIS_COMMIT
auto-pushed to gh-pages"
git push origin gh-pages
echo "Published docs to gh-pages."
else
echo "Error docs are empty."
exit 1
fi