Azure Static Web Apps are free, so why not use them? This site is hosted on it, and it literally costs me zero money. Let’s go!

What you need

  1. A GitHub account
  2. An Azure account

Steps

  1. If you haven’t already, install Git
  2. Install Hugo
  3. Create a new Hugo site (locally). Example: hugo new site mysite
  4. cd mysite
  5. Create a GitHub repo and commit the site. Example:
1
2
3
git init
git add . 
git commit -m "Initial commit"
  1. Create a new Azure Static Web App
  2. Connect the new GitHub repo to the Azure Static Web App
  3. (Optional) Configure your custom domain. TLS certificates are also free with Azure Static Web Apps!

As you commit and push changes to the GitHub repo, a GitHub Action will run and automatically build and deploy the site.