DEV Community

Discussion on: Deploying to Heroku from GitHub Actions

Collapse
 
javaguirre profile image
Javier Aguirre

Hi! thank you for the article!

We also push from GH Actions to Heroku, but we just use git push since it seems it's easier, what's the difference doing it this way or just pushing? Does the build takes less time or more? Thanks!

What we do is:

 steps:
    - uses: actions/checkout@v1
    - name: Push to Heroku
      run: git push -f https://heroku:${{ secrets.HEROKU_API_TOKEN }}@git.heroku.com/${{ secrets.HEROKU_APP_STAGING }}.git origin/master:master
Enter fullscreen mode Exit fullscreen mode

What do you recommend?

Thanks!

Collapse
 
joenash profile image
Joe Nash

Hey Javier!
That’s awesome to hear. It’s not a straight pro/con toss-up, and which builds faster is going to depend on your stack, and that for the most part is also going to decide whether git or docker is better for you.
Docker is going to give you greater flexibility in what you run on Heroku, as you are providing the container. But git is going to be using the Heroku-curated environments that they do a lot of work to optimise around. There’s also, I believe, some features that are less supported for Docker, for example I believe Review Apps isn’t available if you go a certain route for docker deploys.

Collapse
 
javaguirre profile image
Javier Aguirre

Hi! We're using docker, heroku.yml, and the container stack! But instead of pushing to the container registry we use git push to Heroku, I don't understand if there is any difference in doing it your way or the way we do since both are docker deploys.

Thank you for your answer!