Question
Configuring deploy hooks from github
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.
Config:
My webroot lay at: /var/www/domain-name.com/public_html
- 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 domain-name.com/project-1
, domain-name.com/project-2
, 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
- Portent - GitHub Auto-Deploy Setup Guide
- Behind Companies - simple script for deploy
- Digital Ocean Webhooks
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.
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.
×
You could use https://github.com/adnanh/webhook