Skip to content
Example deployment to S3 for Hugo blogs.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Hugo Deploy

This is an starting point for a Hugo blog with deployment to Amazon S3 via GitHub Actions.

It's how I deploy, Edmonton Go, and


Local development:

  • Install the hugo binary, download it at
    • On Mac use Homebrew: brew install hugo


  • A GitHub account with the contents of your website (free).
  • An Amazon account to create an S3 bucket (pennies).
  • DNS configured to point to S3.

What Is Provided?

  • hugo new site <mysite> creates a config.toml and a few empty folders. I've added .gitkeep files so those folders are checked in.
  • An assets/sass folder with all.sass that will be converted to css.
  • A script to watch for file changes in development and include drafts in the output. Run ./
  • .gitignore to avoid committing the generated files.
  • Workflow file that GitHub Actions uses for deployment (.github/workflows/build.yml).


GitHub Actions automatically deploy the website when changes are merged to the master branch on GitHub. In my experience, deploys take a few seconds to complete.

This bucket policy provides public access to the files in S3.

    "Version": "2012-10-17",
    "Statement": [
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
            "Resource": [
You can’t perform that action at this time.