I have a Wowchemy site that I update fairly infrequently. I deploy the site via GitHub Actions and I made the mistake of not pinning a specific Go or Hugo version. Now the latest time I tried to build the site it fails and I can’t seem to find a way to get things building again.
I don’t really care about being on older versions of Go, Hugo, or any other dependencies. I’d just like to be able to build my site again. I’ve tried using Go and Hugo versions dating back to January which was the last time the site successfully built. Unfortunately this hasn’t worked and the logs are old enough that they’ve been erased so I can’t consult which specific version was used at the time.
The error message I’m seeing is shown below.
Run (cd repo; hugo --gc --minify)
hugo: downloading modules …
hugo: collected modules in 4134 ms
Start building sites …
hugo v0.126.1-3d40aba512931031921463dafc172c0d124437b8+extended linux/amd64 BuildDate=2024-05-15T10:42:34Z VendorInfo=gohugoio
WARN deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in a future release. Use .Site.Config.Services.GoogleAnalytics.ID instead.
ERROR render of "page" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/[email protected]/layouts/_default/baseof.html:11:403": execute of template failed: template: event/single.html:11:403: executing "event/single.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
Total in 4898 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/[email protected]/layouts/_default/baseof.html:11:403": execute of template failed: template: section/event.html:11:403: executing "section/event.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
Error: Process completed with exit code 1.
Here is my go.mod
.
module github.com/wowchemy/starter-hugo-academic
go 1.19
require (
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.0 // indirect
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.0 // indirect
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v1.0.0 // indirect
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20230501161443-2d67669ce769 // indirect
)
And finally my GitHub Actions configuration that was working fine as of January.
name: CI
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
path: 'repo'
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: (cd repo; hugo --gc --minify -b "https://cs.rit.edu/~dataunitylab/")