Skip to content

Instantly share code, notes, and snippets.

@bastosmichael
Last active August 29, 2015 14:03
Show Gist options
  • Save bastosmichael/6187f417ece24363f89b to your computer and use it in GitHub Desktop.
Save bastosmichael/6187f417ece24363f89b to your computer and use it in GitHub Desktop.
Push from working branch into master once PR closes using TravisCI and travis gem
after_success:
- if [ $TRAVIS_PULL_REQUEST == "false" ]; then
- git config --global user.email "${GIT_EMAIL}"
- git config --global user.name "${GIT_NAME}"
- git pull origin master
- git remote add travis "https://${GH_TOKEN}@github.com/username/some-branch.git"
- git push travis "${TRAVIS_BRANCH}":master
- fi
env:
global:
- secure: #Travis Gem Generated Key
travis encrypt 'GIT_NAME="Account Name" [email protected] GH_TOKEN=SOMEREALLYLONGSTRING' --add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment