As the GitHub linking is no longer working due to security issues, my app is still on GitHub and I want to put it on Heroku how do I do this easily?
CodePudding user response:
As the security notification says, you can still deploy via git push
.
Assuming you have a local copy of your repository¹ and you would normally do something like git push origin main
to deploy to GitHub:
cd
to your project directoryCheck your remotes:
git remote -v
Do you see a Heroku remote?
If so, make note of its name and go to the next step.
Otherwise, add one:
heroku git:remote -a YOUR_APP_NAME
Now, push directly to the Heroku remote. Assuming it is called
heroku
:git push heroku main
You'll probably also want to push to GitHub to ensure the code for your latest release is synced.
I believe this is the simplest option if you're migrating from GitHub integration, but the documentation also lists other options:
- Docker-based deployments
- Using
dpl
- Via Git hook
- Via Terraform
¹If, for whatever reason, you don't have a local copy of your repository, git clone
it from GitHub and then proceed as above.