Hosting our site with Netlify
There are a number of sites that offer free hosting for static sites. I'll be using Netlify, but you are free to use others, such as Cloudflare Pages, and GitHub Pages, to name a few.
I'll be walking through the steps to doing this with Netlify, but if you're already familiar with another service you're welcome to use whatever you prefer!
Connecting Netlify to GitHub
You don't have to connect Netlify to GitHub, but if you do, it'll automatically rebuild your site any time you push changes to GitHub, so I strongly recommend that you do.
- Click the Add new site button
- Import an existing project
- Select GitHub
You will have to authorize Netlify to have access to your GitHub repo.
You can select specific repositories to give it access to, or you can simply give it full access.
Then, search for the repo of our project and select it.
- Site name determines the default URL
- Branch to deploy will be main by default, which is what we want
- Everything else can be left blank
Once you hit the Deploy button, it'll take a couple of seconds to build your project, and then it'll be online!