TL;DR: Until this is resolved, see instructions for migrating from GitHub deployment to Git deployment below. It is unlikely to be resolved any time soon:
We take the protection of our customers very seriously, and as a result, we will not be reconnecting to GitHub until we are certain that we can do so safely, which may take some time. We recommend that customers use alternate methods rather than waiting for us to restore this integration.
This feature is currently disabled while Heroku investigates a security breach:
To mitigate impact from potentially compromised OAuth tokens, we will revoke over the next several hours all existing tokens from the Heroku GitHub integration. We are also preventing new OAuth tokens from being created until further notice. Your GitHub repositories will not be affected in any way by this action.
Which Heroku features have become non-operative due to the removal of the Heroku-GitHub integration?
- Enabling review apps
- Creating (automatic and manual) review apps
- Deploying (automatic and manual) review apps
- Deploying an app from GitHub (either manual or automatic)
- Heroku CI cannot create new runs (automatically or manually) or see GitHub branch list
- Heroku Button: unable to create button apps from private repositories
- ChatOps: unable to deploy or get deploy notifications
- Any app with a GitHub integration may be affected by this issue. To address specific integration issues, please open a case with Heroku Support
Migrating from GitHub deployment to Git deployment
At 2022-04-21 23:53 UTC, Heroku provided extended instructions for migrating from GitHub-based deployment to Git-based deployment:
While our customers remain unable to reconnect to GitHub via the Heroku dashboard, we wanted to share a supplement to the code deployment methods previously provided. For instructions on how to change your deployment method from GitHub to Heroku Git, please refer to the following Help article: How to switch deployment method from GitHub to Heroku Git with all the changes/app code available in a GitHub repo.
I will quote the entire article since it relates directly to the question being asked:
How to switch deployment method from GitHub to Heroku Git with all the changes/app code available in a GitHub repo
Issue
I have updated my application code in GitHub, and I’d like to push those changes to my Heroku app.
Resolution
From the local repository’s root directory, enter these commands:
$ git pull origin
- This pulls your repo from GitHub, assuming that
origin
is your GitHub remote repo. Change this depending on your local setup. This will make sure all changes committed to GitHub are in your local git repo.$ git checkout branch-to-deploy
- This will checkout the branch you wish to deploy, for example
master
ormain
. You don’t strictly need to do this if you are already working on this branch locally.$ heroku git:remote -a app-name
- This will create the
heroku
remote in your local repo for the app you wish to deploy to.$ git push heroku branch-to-deploy:main
- This pushes the local branch to the Heroku app’s git repository. You can change
heroku
depending on what you do in step 3. You can also use a different branch here if you are not deploying frommain
locally. The last part always needs to bemain
ormaster
, as Heroku will only start builds for pushes to themain
ormaster
branch.Additional Options
If you use the same repo for multiple apps, you can use the
-r
option on step 3 to have different remote names. For example,heroku git:remote -r heroku-dev -a heroku-dev-app
will make theheroku-dev
remote. You can then also add your production app to your local repo by doingheroku git:remote -r heroku-prod -a heroku-prod-app
.To push a specific commit, specify the commit SHA in step 4. For example,
git push heroku commit-ref-sha:main
wherecommit-ref-sha
is the specific commit SHA.