|||

Video Transcript

X

Ship Code Faster: Announcing GitHub Integration GA

Today we’re announcing the general availability of GitHub integration for Heroku. When enabled, GitHub pushes are deployed immediately to linked Heroku apps. This is a big step forward for people working on apps with source managed on GitHub and deployed to Heroku. The integration has been in beta in Heroku Dashboard for a while, and we’ve seen great adoption and positive feedback.

When a GitHub repo is connected to a Heroku app, you can either manually deploy branches from the repo, or you can configure a particular branch to auto-deploy to the app on every GitHub push. With auto-deploys enabled, you no longer have to maintain a separate heroku Git remote: Simply push to GitHub and changes are automatically deployed on Heroku.

Configuring GitHub integration

To connect a Heroku app with a GitHub repo, go to the app’s “Deploy” tab on Heroku Dashboard and select the GitHub pane. If you haven’t connected your Heroku and GitHub accounts, you will be prompted to complete the GitHub OAuth flow. Heroku needs access to help you select repos and to be able to register webhooks triggered when you push to GitHub. Once connected, you can select which repo associated with your GitHub account to link to the Heroku app.

gh-integration-screenshot

With app and repo connected, you can either manually deploy a specific branch, or select a Git branch that will be auto-deployed whenever it’s pushed to on GitHub.

For auto-deploys, you can optionally configure Heroku to wait for continuous integration (like Travis CI) to pass on GitHub. With that option enabled, Heroku will only auto-deploy after all GitHub statuses for that commit have succeeded.

Any builds created by the GitHub integration can be tracked in the app’s “Activity” tab and build output for running builds is streamed in Dashboard.

Recommended setup

Unless your testing and CI is very reliable, we recommend that you only auto-deploy to a staging app. You can use the Pipelines labs feature to promote changes from staging to production, or you can alternatively also link your production app to GitHub and trigger manual deploys to production once you’ve confirmed that a commit is good.

If an issue is encountered during a Heroku deployment, be it manual or automatic, you can always rollback to the last known good release from either the CLI or in Dashboard.

We’re excited about this integration because we know that GitHub is an important part of many of our users’ workflow. With GitHub integration for Heroku, we’re making the process of shipping code on GitHub to Heroku much simpler.

Originally published: February 06, 2015

Browse the archives for news or all blogs Subscribe to the RSS feed for news or all blogs.