Report this

What is the reason for this report?

how to deploy from GH pages to Digital Ocean?

Posted on August 21, 2014
chaz

By chaz

as a beginner, I would like to learn how to deploy and set up/config my current GH project to automatically deploy to my DO account? Other any rules of thumb or talks that I could consult for proper methodology?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I mean to push a GH node.js project from the GHsite to DO.

For instance, this prototype: https://github.com/ccsouthard/cure-map

To deploy your site when you push to GitHub, you’d generally need to use a GitHub webhook to make a POST to the url you provide when GitHub recieves a push. Then on your server, you’d have a script listening for that POST. When it receives it, the script would do a git pull and restart the application.

There are a number of approaches that you can take to deal with the server side. This blog post has one implementation using gith, a simple node server that responds to github post-receive events.

A more straightforward approach might just be to create a new git remote pointing to your server. That way you can push changes to GitHub that aren’t necessarily ready for production and then push to the new remote when you want to deploy. You can use a post receive hook to do any other server side steps. Check out:

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.