Skip to content

Instantly share code, notes, and snippets.

@seun-beta
Last active May 16, 2022 14:37
Show Gist options
  • Save seun-beta/6c53f347779827564e33ef99029b908d to your computer and use it in GitHub Desktop.
Save seun-beta/6c53f347779827564e33ef99029b908d to your computer and use it in GitHub Desktop.
Seunfunmi Adegoke's workaround for deploying to Heroku due to the GitHub-Heroku Token security breach

Heroku-GitHub Integration Continuous Deployment Issue Workaround

  • Follow the link to install Heroku CLI for your OS.
  • After installation, go to your IDE terminal and run heroku login.
  • You would get an option to press any key to open your browser.
  • Login to Heroku on your browser. This action automatically logs you in on Heroku CLI.
  • Commit your code as needed using git commit or your commit style of choice and push to your git repository using git push or your push style of choice.
  • Run bash heroku_deploy.sh to deploy your code to Heroku.
#!/bin/bash
echo "running heroku cli commands..."
heroku git:remote -a <your-heroku-app-name>
git push heroku HEAD:master
@MateusORGM
Copy link

Thanks for that

@MateusORGM
Copy link

Since we have to log-in in heroku with 2-step, I guess there's no way to setup automatic deploys with tasks or webhooks

@seun-beta
Copy link
Author

hey @MateusORGM . There is a GitHub Action that do automatic deploys to Heroku

https://github.com/marketplace/actions/deploy-to-heroku

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment