Skip to content

Instantly share code, notes, and snippets.

@blotto
Created January 27, 2014 19:37
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 blotto/8655767 to your computer and use it in GitHub Desktop.
Save blotto/8655767 to your computer and use it in GitHub Desktop.
CI Deploy to Heroku
#one off to ensure heroku remote is added to repo
heroku git:remote -a myApp
git remote add heroku git@heroku.com:myApp.git
#disables
curl https://heroku.newrelic.com/accounts/ACCTID/applications/APPID/ping_targets/disable -X POST -H "X-Api-Key: APIKEY"
heroku maintenance:on --app myApp
#push to heroku
git push --force heroku master
heroku run rake db:migrate --app myApp
#enables
curl https://heroku.newrelic.com/accounts/ACCTID/applications/APPID/ping_targets/enable -X POST -H "X-Api-Key: APIKEY"
heroku maintenance:off --app myApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment