Software 2023 07 08 Migrating Jekyll Blog from GCP to Netlify
Post
Cancel

Migrating Jekyll Blog from GCP to Netlify

Migrating a static Jekyll blog from Google Cloud Platform to Netlify

  1. Introduction
    1. Github pages
    2. GCP
  2. Migrating to Netlify
    1. 1. Create Project
    2. 2. Add Domain
    3. 3. Configure Netlify DNS
    4. Verify site

Introduction

At the time of writing this article, this blog was previously hosted with both Github Pages, and Google Cloud Platform (GCP). Now, it’s time to move on to the next hosting option, Netlify. If you’ve read my previous article on hosting the Dream Capture Co photography website, you’ll know that I’ve recently fallen in love with Netlify as a hosting provider for it’s ease of use, powerful feature set, and fantastic free tier. Now, I’m ready to migrate my personal blog over from GCP.

Github pages

The first hosting for the blog was Github Pages, but I switched from that to GCP since I was having trouble with third-party libraries during the automated build process. More about hosting with Github Pages in this article

GCP

To host this blog on GCP I used a storage bucket to hold all of the site files, and a load-balancer instance to direct my domain name to the storage bucket. I won’t get into the details in this article, but it was quite a lot of configuration work to host a simple static generated site. Not to mention the fact that I have been spending about $18 a month just for the HTTP load balancer to direct traffic to a storage bucket…

Migrating to Netlify

Now it’s time to migrate blog hosting to my new favorite cloud hosting provider. I’ll walk through this process step by step:

1. Create Project

  • From the Netlify Console, click on Add new site and select Import an existing project
  • Select Deploy with GitHub Deploy with Github
  • Select the repository for the site from the list
  • Ensure that the deployment configuration is correct - Netlify is able to automatically identify that the site is a Jekyll project, and automatically fills out the appropriate configuration fields. If the filed do not auto-populate, ensure that Build command is set to bundle exec jekyll build and Publish directory is set to _site (id using default jekyll configuration) Build configuration
  • Click Deploy blog to start the first deployment
  • Wait for the deployment to complete. You can click on a deployment in the list to see it’s details Deployment list

2. Add Domain

After the deployment is finished, it’s time to set up the custom domain name.

  • Go to Site configuration->Domain Management, and click on Add a Domain Add domain
  • Enter the custom domain and click Verify - if the domain was purchased through another provider, you will have to click Add domain and then complete additional steps to update external DNS entries. Verify domain

3. Configure Netlify DNS

I bought my domain from Namecheap, so I’ll have to use the Namecheap dashboard to update my DNS nameservers to point to Netlifys nameservers.

  • In the Namecheap console, click Manage for the domain name, and select the DNS tab.
  • Change nameservers option to Custom DNS, and add all the nameservers provided by Netlify. Custom DNS
  • Verify the DNS entries on Netlify: DNS Entries

Verify site

Visit both the TLD and any sub-domains configured, and ensure that they load properly.

This post is licensed under CC BY 4.0 by the author.