Parking for Pennies (or less) — Part 3
Publishing to a CDN with GitHub and Netlify
Git Provider — GitHub
A git provider acts as the free offsite storage and intermediary between your local content and a cloud CDN. Your choices may be driven what CDN you are deploying to, or visa-versa. I went with GitHub mainly because that’s what I’ve used in the past. Many uses fall within their free plan, at least initially.
TachyonCMS is purposefully agnostic about how the content data gets from the local file to the CDN. It should be easy to fit it into any process already using git. The TachyonCMS project will document publishing through various git providers as we progress.
To use GitHub with Netlify there is no special configuration needed on the GitHub side. Netlify will guide you through authorizing the project, but that flow needs to be started from their website.
Cloud CDN — Netlify
We need a cloud CDN to serve our static app. There are many available and most offer a free tier of service. That free tier may satisfy a domainer’s parking needs forever. For a startup it will certainly get them out of the gate, on a platform that should be able to take them all the way to the finish line.
Netlify has a free tier that may work for domainer parking needs. It could also take a startup through PoC and easily scale beyond that. Configuration is simple.
Repo Settings
- You define your fork of the Multi-Site App as the Current repository.
In this case it is github.com/bwinkers/multi-site-app
Build Settings
- The Base directory is app.
Even though this is not currently a monorepo we want to accommodate future growth. - The Build command is quasar build
- The Publish directory is app/dist/spa
- This is an open source project so our logs are public.
- Builds need to be Active to have your changes published.
To save build minutes, if you are going to make a bunch of changes you can turn off builds and only build at the very end.
Branch Settings
- The Production branch is production.
If this will only ever be a personal project and you want to minimize git activity you can set this as main or whatever the default branch is. - I only deploy the production branch. If I later choose to deploy other branches I would need to support their hostnames in the configs.
Deploy Preview Settings
I don’t deploy previews, again mainly because of the hostname support needed. Also, there is a desire to minimize wasted build minutes so we can deploy fresh content more often without exceeding the free minutes.
Additional Parts of this Article
Medium was having problems with a large story so I had to break it up.
Part 1 — OverviewPart
Part 2 — Creating Site Flows
Part 3 — Publishing to a CDN with GitHub and Netlify
Part 4 — DNS Configuration
Previous Articles in the Series
Part 1 — Parking for Pennies
Part 2 — AWS SSL Certificates
Part 3 — Mass Hosting Paradigm
Part 4 — Not Content with Contentful
Part 5 — Introducing TachyonCMS
Part 6 — Parking for Pennies (or less) — Part 1
Part 6b — Parking for Pennies (or less) — Part 2