Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
Don't deploy on PRs either
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Kampmann committed Nov 3, 2015
1 parent d2535cc commit fca6856
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .travis.yml
Expand Up @@ -92,25 +92,27 @@ after_success:
export DEPLOY_PATH_FULL="$DEPLOY_PATH/$APP"
export NEW_TAG="CI_$APP_$TRAVIS_JOB_NUMBER"
if [ "$TRAVIS_REPO_SLUG" == "$DEPLOY_SLUG" ] && [ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" ]; then
echo "We are trying to deploy $DEPLOY_SLUG:$DEPLOY_BRANCH"
eval "$(ssh-agent -s)"
if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
[ "$TRAVIS_REPO_SLUG" == "$DEPLOY_SLUG" ] &&
[ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" ]; then
echo "We are trying to deploy $DEPLOY_SLUG:$DEPLOY_BRANCH"
eval "$(ssh-agent -s)"
chmod 600 .infrastructure/travis/id_rsa
ssh-add .infrastructure/travis/id_rsa
chmod 600 .infrastructure/travis/id_rsa
ssh-add .infrastructure/travis/id_rsa
git config push.default simple
git config --global user.name "Travis CI"
git config --global user.email "travis@beavy.xyz"
git config push.default simple
git config --global user.name "Travis CI"
git config --global user.email "travis@beavy.xyz"
git remote add deploy "$DEPLOY_SERVER:$DEPLOY_PATH_FULL"
git remote add deploy "$DEPLOY_SERVER:$DEPLOY_PATH_FULL"
git add -f config.yml var/assets/*
git commit -m"Adding config and assets for deploy"
git tag $NEW_TAG
git add -f config.yml var/assets/*
git commit -m"Adding config and assets for deploy"
git tag $NEW_TAG
# this will trigger the autodeploy if setup properly
git push deploy $NEW_TAG
# this will trigger the autodeploy if setup properly
git push deploy $NEW_TAG
else
echo "We are not on the target deploy branch. Aborting."
Expand Down

0 comments on commit fca6856

Please sign in to comment.