ricardocaldeira
ricardocaldeira

Reputation: 699

Deploy to heroku directly from my github repository

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

Answers (6)

TeoTN
TeoTN

Reputation: 519

Heroku recently added option to synchronize deployment with GitHub

Upvotes: 5

CraigColes
CraigColes

Reputation: 87

Create a 'Deploy to Heroku' button and include in the README - https://devcenter.heroku.com/articles/heroku-button

Upvotes: 0

Sagiruddin Mondal
Sagiruddin Mondal

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

udit
udit

Reputation: 2783

snap-ci is an easy way to setup a deployment pipeline from Github to Heroku

Upvotes: 2

John Beynon
John Beynon

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

Michael Davis
Michael Davis

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

Related Questions