Skip to content

fix(docs): fix version discovery and Hugo env in v2 workflow#1375

Merged
hkad98 merged 2 commits intogooddata:masterfrom
hkad98:jkd/docs-ci-build
Feb 27, 2026
Merged

fix(docs): fix version discovery and Hugo env in v2 workflow#1375
hkad98 merged 2 commits intogooddata:masterfrom
hkad98:jkd/docs-ci-build

Conversation

@hkad98
Copy link
Contributor

@hkad98 hkad98 commented Feb 27, 2026

Summary

  • Fix discover-versions.sh regex to match three-part branch names (e.g. rel/1.60.0). The previous regex only matched two-part versions (major.minor), resulting in zero branches discovered. Updated to strip the patch component to get the section name (e.g. 1.60), matching the original generate.sh behavior and docs/config/production/params.toml.
  • Set HUGO_ENV=production explicitly in the v2 workflow build step. Without it, Hugo may not load config/production/params.toml which contains the full version list for the version picker. The _default config only has a single "Latest" entry. Matches the original hugo-build-versioned-action behavior.

The release branches use three-part versions (e.g. rel/1.60.0) but
discover-versions.sh filtered with a two-part regex (major.minor),
matching zero branches. Updated the regex to match three-part versions
and strip the patch to get the section name (1.60), aligning with the
original generate.sh behavior and docs/config/production/params.toml.

jira: trivial
risk: nonprod
Without explicit HUGO_ENV=production, Hugo loads config/_default/params.toml
which only has a single "Latest" entry. The full version list for the
version picker lives in config/production/params.toml (maintained by
bump_doc_dependencies.py during releases). Hugo defaults to production
for builds, but being explicit matches the original hugo-build-versioned-action
and avoids any ambiguity.

jira: trivial
risk: nonprod
@hkad98 hkad98 merged commit 1ca5699 into gooddata:master Feb 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants