Skip to content

Commit

Permalink
Fix update-gh-pages.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Apr 15, 2015
1 parent 0c0dd14 commit 5dd3681
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions update-gh-pages.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#!/bin/sh

# copy rendered image to result directory
convert ./simplept.ppm ./results/simplept.jpg

if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
echo -e "Starting to update gh-pages\n"

convert ./simplept.ppm $HOME/simplept.jpg
cd $HOME
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"

git checkout gh-pages
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/tatsy/rainy.git gh-pages > /dev/null

cd gh-pages
cp $HOME/simplept.jpg results

git add -u
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to gh-pages"
git remote set-url origin https://github.com/tatsy/rainy.git
git push -fq origin gh-pages > /dev/null
fi

0 comments on commit 5dd3681

Please sign in to comment.