Member-only story
How to Automatically Deploy from GitHub to Server using Webhook
A way to get your code deployed to the production server

I’ve gotten into the habit of creating git repositories and managing them on GitHub. It’s a lot better than keeping everything on Google Drive or, even worse, on my hard drive. But the question always bugged me,
How do I get my code deployed to the production server?
Most of my searching led me to Jenkins and other continuous integration solutions, but I didn’t want that much overhead — after all, this isn’t my day job, so to speak. What I was looking for was a solution involving no new accounts, and a relatively low technical barrier to entry. Fortunately, in my search I came across the SaaS product HookDoo, which led me to Webhook—the server-residing, free-to-use, underlying technology of the former.
Webhook allows me to automatically retrieve the newest code any time a push is performed to the repo
For the purposes of this tutorial, we’ll be using a freshly created Digital Ocean droplet with Ubuntu 16.04 as our production server. To minimize the steps necessary to implement, I’ll be doing everything as the root user.