microcks / microcks/microcks.io

Align and pin Hugo across local deployment, CI, and Netlify

Open
#578 1 comment 0 reactions 2 assignees Claimed by @lbroudoux View on GitHub
component/rendering good first issue kind/task
Dominant language
JavaScript
Stars
25
Forks
88
Avg merge
4h 22m
Merged PRs (30d)
14

Description

## Context

The website currently uses different Hugo versions depending on the build environment:

- The currently deployed `microcks.github.io` homepage was generated with Hugo 0.154.5.
- Netlify is pinned to Hugo 0.123.0.
- GitHub Actions installs the latest Hugo release, currently 0.165.0.
- `deploy.sh` uses whichever Hugo executable is installed locally.

This version drift makes builds difficult to reproduce and prevents safely migrating deprecated language configuration and template methods introduced in Hugo 0.158.0.

## Objective

Use Hugo 0.165.0 Extended consistently across local publication, GitHub Actions, and Netlify before addressing the language deprecation warnings.

This issue covers build-environment alignment only. Changes to `languageCode`, `languageName`, or the corresponding template methods will be handled in a separate follow-up issue and PR.

## Proposed changes

- Add a `.hugo-version` file containing `0.165.0`.
- Pin `peaceiris/actions-hugo` to Hugo 0.165.0 instead of `latest`.
- Change `HUGO_VERSION` in `netlify.toml` from 0.123.0 to 0.165.0.
- Update the minimum supported Hugo version in `config/_default/module.toml`.
- Add a preflight check to `deploy.sh` requiring Hugo 0.165.0 Extended before publication.
- Add a non-publishing `deploy.sh --check` mode that:
- runs the production build using the same options as publication;
- writes into a temporary directory;
- does not modify the `public` submodule;
- does not commit or push anything.
- Document the required Hugo version and the deployment preflight command.
- Compare output generated from the current source using Hugo 0.154.5 and 0.165.0, and document any differences.

## Acceptance criteria

- GitHub Actions builds successfully with Hugo 0.165.0 Extended.
- A Netlify production or deploy-preview build succeeds with Hugo 0.165.0.
- `./deploy.sh --check` succeeds without changing the source worktree or `public` submodule.
- `deploy.sh` stops with a clear message when the installed Hugo version is incorrect or is not the Extended edition.
- The output comparison between Hugo 0.154.5 and 0.165.0 is documented.
- Laurent confirms that `hugo version` and `./deploy.sh --check` succeed in the environment normally used to publish `microcks.github.io`.
- No language configuration or template deprecation changes are included in this work.

## Follow-up

Once all publication environments are confirmed on Hugo 0.165.0, a separate PR can safely migrate:

- `languageName` to `label`;
- `languageCode` to `locale`;
- `LanguageCode` template methods to `Locale`;
- `LanguageName` template methods to `Label`;
- the imported PWA module to its corresponding upstream fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.