Member-only story

How to Automatically Deploy from GitHub to Server using Webhook

A way to get your code deployed to the production server

Jonathan Hsu
Better Programming
6 min readJan 23, 2019

--

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.

--

--

Responses (7)

What are your thoughts?