#!/bin/bash
mvn --offline clean javadoc:aggregate &&
git clone --reference . --branch gh-pages `git config --local remote.origin.url` .gh-pages &&
cd .gh-pages &&
git rm -rf * &&
cp -R ../docs/documentation/* ./ &&
cp -R ../target/site/apidocs javadocs &&
git add . &&
git commit -m 'Synchronizes documentation.' &&
git push origin gh-pages &&
cd .. &&
rm -rf .gh-pages
