Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy to heroku directly from my github repository

Tags:

github

heroku

How can I deploy my app to Heroku directly from my GitHub remote repository?

Does a command for that exist, like this?

heroku push https://github.com/user/repository.git

Any tips? Tricks?

like image 877
ricardocaldeira Avatar asked Jul 09 '13 20:07

ricardocaldeira


People also ask

Can I Deploy private GitHub repo to Heroku?

To get a private GitHub repo to work on Heroku, you can leverage the netrc buildpack in conjunction with the Heroku Ruby buildpack. When setting up the Gemfile , make sure to use the https GitHub URL.

Can you Deploy to Heroku without git?

You can use https://github.com/ddollar/heroku-push and push directories without git.

Can you Deploy from GitHub?

You can run your deployment workflow on GitHub-hosted runners or on self-hosted runners.


2 Answers

You can put services in between Github and Heroku which may achieve a similar result to what you want.

There are presently two addons in the Heroku Addon library which would be able to do this for you via Continuous Deployment.

Codeship.io (https://addons.heroku.com/codeship) wercker (https://addons.heroku.com/wercker)

Basically, when you add and setup these addons they install a webhook into your projects github repo and then when you push to the repo, the webhook is triggered which triggers the service to grab your code (run tests if you want) and then push the code to Heroku.

like image 81
John Beynon Avatar answered Oct 05 '22 08:10

John Beynon


Heroku recently added option to synchronize deployment with GitHub

like image 34
TeoTN Avatar answered Oct 05 '22 10:10

TeoTN