GitHub Actions keep failing on themes - module does not exist

Hi,

First time user of Hugo, coming from the darkages of WordPress. I’ve done a blank project and pushed to GitHub, all good so far. But my action keeps failing with the following error:

Error: module "aether" not found; either add it as a Hugo Module or store it in "/home/runner/work/www-mysite-net/www-mysite-net/themes".: module does not exist

Error: Process completed with exit code 255.

My Config is:

baseurl = "https://www.mysite.net"

title = "Test site"

author = "Me"

canonifyurls = **true**

paginate = 3

theme = "aether"

themesDir = "themes"

[params]

brand = "aether"

description = "aether Hugo theme for blogs"

headshotimg = "img/faceshot.jpg"

headshotalt = "Generic grey headshot picture"

[markup]

[markup.highlight]

style = "igor"

[deployment]

# By default, files are uploaded in an arbitrary order.

# Files that match the regular expressions in the "Order" list

# will be uploaded first, in the listed order.

order = [".jpg$", ".gif$"]

[[deployment.targets]]

# An arbitrary name for this target.

name = "prod"

# S3; see https://gocloud.dev/howto/blob/#s3

# For S3-compatible endpoints, see https://gocloud.dev/howto/blob/#s3-compatible

URL = "s3://mysite.net?region=my-region-2"

[[deployment.matchers]]

# Cache static assets for 1 year.

pattern = "^.+\\.(js|css|svg|ttf)$"

cacheControl = "max-age=31536000, no-transform, public"

gzip = **true**

[[deployment.matchers]]

pattern = "^.+\\.(png|jpg)$"

cacheControl = "max-age=31536000, no-transform, public"

gzip = **false**

[[deployment.matchers]]

# Set custom content type for /sitemap.xml

pattern = "^sitemap\\.xml$"

contentType = "application/xml"

gzip = **true**

[[deployment.matchers]]

pattern = "^.+\\.(html|xml|json)$"

gzip = **true**

And my workflow action is:

name: Hugo S3 deploy

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-20.04
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: ap-southeast-2

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: 'latest'

      - name: Build HTML public/
        run: hugo --minify

      - name: Deploy to S3 bucket
        run: hugo deploy

I have no idea where to start resolving this, any pointers would be greatly appreciated. Site runs fine locally using hugo -D

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See https://discourse.gohugo.io/t/requesting-help/9132.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Let me take another look.

I just cloned a public version and redacted my stuff and … it completed successfully. U G H

One issue i did find was that the theme install didn’t update the .gitmodules file.