diff --git a/deploy.sh b/deploy.sh index 2d6403d..5342609 100755 --- a/deploy.sh +++ b/deploy.sh @@ -10,12 +10,6 @@ function doCompile { aglio -i api-documentation.md -o out/index.html } -# Pull requests and commits to other branches shouldn't try to deploy -if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then - echo "Skipping deploy." - exit 0 -fi - # Save some useful information REPO=`git config remote.origin.url` SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} @@ -34,6 +28,12 @@ rm -rf out/* || exit 0 # Run our compile script doCompile +# Pull requests and commits to other branches shouldn't try to deploy +if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then + echo "Skipping deploy." + exit 0 +fi + # Now let's go have some fun with the cloned repo cd out git config user.name "Travis CI"