#!/bin/bash
if [ "$TRAVIS_REPO_SLUG" == "JakobOvrum/Dirk" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
	echo -e "Generating DDoc...\n"
	git config --global user.email "travis@travis-ci.org"
	git config --global user.name "travis-ci"
	git clone --recursive --quiet --branch=gh-pages https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG} gh-pages > /dev/null
	cd gh-pages
	sh ./generate.sh
	git add -f *.html
	git commit -m "Lastest documentation on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
	git push -fq origin gh-pages > /dev/null
	echo -e "Published DDoc to gh-pages.\n"
fi

#!/bin/bash
if [ "$TRAVIS_REPO_SLUG" == "JakobOvrum/Dirk" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
	git clone --recursive --branch=gh-pages https://github.com/${TRAVIS_REPO_SLUG}.git gh-pages

	cd gh-pages
	git config credential.helper "store --file=./git/credentials"
	echo "https://${TOKEN}:@github.com" > .git/credentials
	git config user.name "travis-ci"

	echo -e "Generating DDoc...\n"
	sh ./generate.sh
	git add -f *.html
	git commit -m "Lastest documentation on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
	git push
	echo -e "Published DDoc to gh-pages.\n"
fi

Fix DDoc pushing script (take two)
Fix DDoc pushing script (take two)
