Switching from the GitHub Pages to Zeit Now deployment

I'm switching from the GitHub Pages to Zeit Now static deployments for this blog. Here's my blog source code https://github.com/alexandr-g/alex-blog so you can look it up if you're curious.

My GitHub Pages config:

GitHub Pages - is a well-known way to host your static websites and it's working well, it supports custom domains.

My blog is running on it with Gatsby right now. Configuring some DNS magic with Cloudflare I have support for the https:// on it which is nice.

Release workflow

However, the pain is that whenever I need to deploy/release a new article I'm going through the same actions:

  1. Create a branch, write a blog post
  2. Commit and push to the GitHub
  3. Even if I push to the `master` branch nothing happens until I manually run the npm script
  4. *To release* a new version I need to run a special npm script locally, which creates a production bundle, prefixes paths for articles and publishes the update to the GitHub Pages.

yarn build:gh

Only then, after some time, the new blog post appears on the website.

What I want instead is that every change that merged to the master branch be deployed to production automatically leveraging the continues delivery so step #4 becomes completely automated and obsolete.

That's what Zeit Now is doing. In the previous article, I showed how to configure Now to deploy every commit and branch in your repository.