Skip to content

GitHub Heroku Connect

missybarringer edited this page May 2, 2019 · 2 revisions

How to connect a GitHub Repository to Heroku for Automatic Deployments

This short guide will take you through the steps of creating a repository, and then connecting your new repository to a Heroku application. This will allow for continuous deployment everytime you push the master branch of your GitHub repository!

Note: Please ensure your app functions properly locally with no errors. Fix any errors that are occurring or you can expect your application to not deploy.

Create your GitHub Repository

First, we need to create a new GitHub repository.

  1. Navigate to GitHub and sign into your account.

  2. On the left-side navbar, click the New button next to Repositories

New Repository

  1. Name your new repository and then click Create repository.

Create Repository

Create New Heroku Application

Now that we have a GitHub repository, we need to create a new Heroku Application. We will do this via Heroku's website.

  1. Navigate to Heroku

  2. Login and on your dashboard click New and then in the dropdown click Create new app.

Create New Heroku App

  1. Next, name your new application and click Create app.

Create App

  1. On the Deploy tab, click GitHub (connect to GitHub)

GitHub

  1. Next, click Connect to GitHub.

Connect to GitHub

  1. A modal will appear asking you to Authorize Heroku to access your GitHub. Click Authorize Heroku.

Authorize Heroku

  1. Now that you have authorized Heroku and given access to your GitHub. Use the search box to search for the repository you created earlier.

Search for Repo

  1. Finally, click Connect to the right of the repo you created earlier.

Connect

  1. Scroll down to the Automatic Deployment section, and click Enable Automatic Deployments.

Now you are good to go! Whenever you are working on your project and you push to master via PR (You should never be pushing directly to master!) it will automatically push to Heroku, updating your live application!

  • We have also created a video guide for you to follow along with if you need

Connect GitHub to Heroku

If you have any further questions or get stuck, please ask your TAs for assistance.

Clone this wiki locally