export BUILDING_DOCS=true
cd docs || exit
rm -rf build
rm -rf gh-pages

make html

git clone git@github.com:F-WuTS/compLIB.git gh-pages

cd gh-pages || exit
git checkout gh-pages

cp -r ../build/html/* .

git add .
git commit -a -m "Update documentation"
git push origin gh-pages

cd ..
rm -rf gh-pages

cd ..
export BUILDING_DOCS=false