Deploy Previews for GitHub

Learn how to configure Deploy Previews using the GitHub + Heroku Plugin.

View as Markdown

Overview

Deploy Previews for GitHub are made possible through the GitHub Heroku app.

Whenever you open a pull request on your GitHub repository, Heroku will automatically spin up a disposable app, reflecting the changes proposed in your pull request.

Configuring the GitHub App

1

Connect GitHub to Heroku

Connect your GitHub account with Heroku, then link the specific repository of the app you want to deploy. This is handled through logging into the Heroku dashboard and navigating to the “Deploy” section, where you can connect your GitHub account and select the repository to sync.

2

Set up a Heroku Pipeline and enable Review Apps

Set up a Heroku Pipeline and enable Review Apps for it. While setting up the Review Apps, you can decide whether you want Heroku to create a new app for each pull request manually or automatically.

3

Open a pull request

Once enabled, Heroku creates a new Review App for every pull request that’s opened on the GitHub repository. It deploys the exact version of your code that is reflected by the pull request.

4

Preview the Review App

The Review App is accessible via a unique URL, so you can interact with it just as you would with a regular app on Heroku.

5

Automatic teardown

After the pull request is closed (either by merging or just closing without merging), the Review App is destroyed automatically, including all associated add-ons and data.