Now that the clickbait title is out of the way, here are the disclaimers: YMMV. You may not actually save $40/month but I did.
I used to have a lot of personal project sites including this one. A decade ago I switched from hosting a couple of sites individually to paying for a Windows VM so I could host multiple sites easily. I was comfortable with Windows server, IIS, SQL Server, a backup strategy, etc. so it was made sense and was a good decision that worked well for a long time. However over the last couple of years I have been simplifying, letting domain names expire and shutting down those other projects. Recently I was left with just this one. It was running on the .NET stack and used SQL Server to store data. Paying for a VM for just the one site seemed like overkill and I considered moving to Azure or an alternative. But then something else crossed my path.
Once I decided to make the switch I setup a new site on my VM, pasted in the artifacts of the Gatsby build process, and began testing. After I was satisfied I shut down the old .NET site and SQL server and had just the one static site hosted by IIS on my VM. Again, overkill.
I read in the Gatsby docs that Netlify (and Netlify CMS) is a good match for Gatsby sites and that I could probably use it for free assuming my traffic and storage stayed under certain limits (IIRC) so I considered that an option. I also read that using GitHub pages is supported for Gatsby and well documented. Like most of us I already use GitHub, I was not making use of my User/Organization page (danhounshell.github.io), and I was already paying $7/mo for GitHub, and I was already hosting the source for this site on GitHub. So I decided to give GitHub pages a try and it is a perfect fit for me and this site’s hosting needs. After following the instructions on GitHub and in the Gatsby docs for setting up a GitHub page, I updated some DNS records and then promptly cancelled my VM subscription thus saving me $40 per month.
I am not doing continuous builds or automated deploys, though I could if I wanted. I do not need to – this is just my blog. But life became simpler after switching to using GitHub pages to host the site. My workflow looks like this:
My deploy script does all the “hard work” of pushing the results of the build to the master branch of my repo, which is the source of the GitHub page. I could even make things easier by going to Netlify, which provides for workflows and would handle the pushes to GitHub source, building and deploying, or using some other automated build and deploy tool. But I am happy where I am for the time being knowing how far I have come.
Hopefully my experience helps you. Give me a shout at @danhounshell on Twitter if it did.