2
# pick repo for gh-pages branch
5
if [ ! -d gh-pages ]; then
6
echo "setting up gh-pages subdir"
7
mkdir gh-pages || exit -1
8
cp -r ../.git gh-pages/ || exit -1
11
git checkout $repo/gh-pages || init=1
12
if [ "$init" != "0" ]; then
13
echo "initializing gh-pages repo"
14
git symbolic-ref HEAD refs/heads/gh-pages || exit -1
15
rm .git/index || exit -1
16
git clean -fdx || exit -1
19
git commit -a -m 'init gh-pages' || exit -1
20
git push origin HEAD:gh-pages
24
echo "updating local gh-pages with html build"
25
rsync -va build/html/ gh-pages/ --delete --exclude .git --exclude .nojekyll || exit -1
30
git commit -a || exit -1
31
echo "pushing to remote gh-pages"
33
git push $repo HEAD:gh-pages