It’s the year 2020 and it was time to upgrade my personal web site, chriskinnan.com,. which had been languishing as a couple of static templates on S3/Cloudfront for many years.
I’ve been off-and-on studying React and “JAMStack” and GatsbyJS is the preferred framework, using the clean and modern Lumen template.
I considered 3 different deployment options— AWS, GitHub Pages, and Netlify.
As an AWS Architect, I first deployed on S3/Cloudfront using the GatsbyJS S3 Plugin. For the typical user the most complex aspect would probably be the DNS and Cloudfront configuration. This was easy but has limited functionality (I haven’t delved into AWS Amplify yet). Since this is a personal project, I wanted to kick the tires on other options.
Everyone knows GitHub Pages from the multitude of software projects that use them. Setting up was also easy with the GatsbyJS Git Hub Pages module. DNS was simple too, just CNAME routing. The only issue I had with GitHub was a deal-breaker though. For Pages, the underlying chriskinnan.github.io repository needs to be set as public. I know we’re just hosting the deployment, and I don’t use my personal GitHub account for anything else, but that still seems like an unnecessary, potentially insecure setting. Heartburn.
Fortunately Netlify is free for this type of use and can deploy from a private GitHub repository. That’s the platform currently serving these pages. It was easy to set up and Netlify pulls automatically from the hosted private repo with every “npm run deploy” command.