6

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?

6 Answers 6

13

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.

Sign up to request clarification or add additional context in comments.

Comments

5

Heroku recently added option to synchronize deployment with GitHub

1 Comment

devcenter.heroku.com/articles/github-integration, note its in public beta as of Jun 2015
4

There is no way to push from one git remote to another. You will have to clone from github and then push to heroku.

1 Comment

If I already have the Github repo contents on my machine, as it's where I'm developing the thing, should I clone to a separate folder and push from there, or just push straight from the existing folder?
2

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

Comments

1
 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 ?

1 Comment

In your case, we are cloning reppository to our computer first then we deploy it to heroku, the question is , how to deploy directly.
0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.