Update README.md - change Hugo version from latest to specific version#329
Update README.md - change Hugo version from latest to specific version#329
Conversation
Using latest was causing a build error because of breaking changes in the latest version of Hugo. The README file is now updated to use the same version of Hugo we are deploying to our website. Updated the GitHub action to check version of Hugo in README and deployed Hugo on push or pull. Fail operation if they have drifted apart. This will help ensure that when we roll the version of Hugo the documentation is correct.
There was a problem hiding this comment.
Pull request overview
Pins the Hugo version in README.md install instructions to 0.155.3 (matching the CI workflow) and adds a CI validation job to catch future version drift between the README and the workflow's HUGO_VERSION env var. Also adds pull_request trigger support and updates documentation to reflect the new workflow structure.
Changes:
- Replaced dynamic "latest" Hugo download commands in README with pinned version 0.155.3 URLs and cleaned up example output
- Added
validate-docsCI job to verify README references match the configured Hugo version - Added
pull_requesttrigger to the workflow and skips deploy on PRs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Pins Hugo version in install instructions, updates example output, fixes config path and GCS engine ID, documents new workflow jobs |
| .github/workflows/gh-pages.yml | Adds pull_request trigger, validate-docs job, updated build conditions, skips deploy on PRs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pamoroso
left a comment
There was a problem hiding this comment.
I'm not familiar with the internals of Hugo or YAML but I think it works as intended.
masinter
left a comment
There was a problem hiding this comment.
please respond to the copilot-generated review comments, if only to accept or reject the proposed hanges to the PR.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Paolo Amoroso <paolo.amoroso@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Paolo Amoroso <paolo.amoroso@gmail.com>
|
I'm good with Copilot's suggestions and Paolo's merging them in. I'm going to go ahead and merge the PR. |
The local build instructions have been updated to specify the version of Hugo. Initially they specified
latest, this worked until breaking changes were introduced in Hugo v0.156.0. Running Hugo with this or later versions causes errors when runninghugo serverlocally.The breaking changes will be handled separately in Issue 2534.
The README file is now updated to use the same version of Hugo we are deploying to our website.
In addition, updated the GitHub action to compare the version of Hugo in the README and deployed by the GitHub action on a push or pull operation. Merges into main will fail if they have drifted apart. This will help ensure that when we roll the version of Hugo the documentation is correct.
Here's an example of what a failure will look like: