-
Notifications
You must be signed in to change notification settings - Fork 72
Heroku: automatic deployment to Heroku
Yes, you read that title correctly — you can set up automatic deployment to Heroku from within Heroku itself! Heroku makes this extremely easy, but note that to accomplish the following steps you will either need to be the repo owner (for GitHub user accounts) or an admin (for GitHub organization accounts).
Automatic deployment means that changes to a specific branch (e.g. master
) will immediately be incorporated into the live application. This is definitely in the spirit of continuous integration and is just one more way modern tools streamline the development process, letting you focus on the fun stuff — writing your app.
- Sign in to Heroku
- Click the
Deploy
tab in the nav bar - Next to
Deployment Method
, selectGitHub
- Click the
Connect to GitHub
button - Authorize Heroku's access to your GitHub account
- Enter your repo name and click
Search
- Click
connect
- Select which branch will represent your main release branch. You'll probably want to stick with
master
. - OPTIONAL BUT RECOMMENDED: decide whether you want to wait for CI tests to pass before deploying. Assuming you have CI testing set up, we recommend you enable this option; the only reason you'd disable it is if you don't have CI testing configured, or if you're ok automatically deploying code with failing tests. Can you really justify the latter?
- Finally, click
Enable Automatic Deploys
. That's it!
From now on, every change to master
(or your selected branch) will deploy your updated app to Heroku. Pretty nifty! Note that you should not push to the heroku
remote any more; your Github account replaces it.