Skip to content

Instantly share code, notes, and snippets.

@dleve123
Created June 18, 2014 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dleve123/36cf0b23e623460d2e50 to your computer and use it in GitHub Desktop.
Save dleve123/36cf0b23e623460d2e50 to your computer and use it in GitHub Desktop.
not super secure deploy from travis to aptible
if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
echo "branch will be deployed!"
echo -e "Host beta.aptible.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
chmod 600 .travis/travis_key.pem
ssh-add .travis/travis_key.pem
git remote add staging git@beta.aptible.com:healthify-staging-aptible.git
git fetch --unshallow
git config --global push.default simple
git push staging HEAD:$TRAVIS_BRANCH
else
echo "Branch: $TRAVIS_BRANCH is not master and not being deployed!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment