Reputation: 699
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?
Upvotes: 6
Views: 15131
Reputation: 87
Create a 'Deploy to Heroku' button and include in the README - https://devcenter.heroku.com/articles/heroku-button
Upvotes: 0
Reputation: 5787
git clone git://github.com/heroku/ruby-sample.git
cd ruby-sample
heroku create
git push heroku master
heroku open
It was as default example from heroku. You can get an idea. right ?
Upvotes: 1
Reputation: 2783
snap-ci is an easy way to setup a deployment pipeline from Github to Heroku
Upvotes: 2
Reputation: 37507
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.
Upvotes: 13
Reputation: 2430
There is no way to push from one git remote to another. You will have to clone from github and then push to heroku.
Upvotes: 4