-
Notifications
You must be signed in to change notification settings - Fork 7
/
push-ddoc.sh
executable file
·18 lines (16 loc) · 742 Bytes
/
push-ddoc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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 --global user.name "travis-ci"
git config --global user.email "travis@travis-ci.org"
git config --global push.default simple
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