Configuring deploy hooks from github

September 5, 2016 5.6k views
Git DigitalOcean Deployment Ubuntu 16.04

I have configured a Digital Ocean droplet as per the following guides:

  • Initial Server Setup with Ubuntu 16.04
  • Install LAMP stack on Ubuntu 16.04
  • Secure apache with let's encrypt

In summary: I have a LAMP server, I have a domain pointed at my LAMP server, it is https now, and I can ssh into it with an account I created (not root) and it has things like UFW enabled.


My webroot lay at: /var/www/

  • I can confirm that when I put an index.html file there, it works

What I'm trying to accomplish:

I want to use a webhook such that when a github repo receives changes to master branch, the hook pushes an update to my droplet. I want to be able to have multiple repos/sites, so think,, etc.

What I don't want:

  • many tutorials talk about pushing from local to DO. I don't want to do this. I want to go from github to DO.

I have tried a number of tutorials which I am linking to below

None of these works for my situation, number 3 because I don't want to go straight from local to droplet. First two for different reasons.

Any help would be appreciated.

4 Answers

Addendum: I should mention that I am not interested in solutions like deploybot and codeship, etc. I really just want to properly setup a github webhook direct into my droplet. I understand this means not just setting up the webhook but also the deploy key. I am comfortable enough to do this. I just need a guide. Thanks

Did you manage to get set this up easily?

If so, would you mind sharing how you did it please,


Have another answer? Share your knowledge.