Skip to content

feat: add prepare-command to hugo-ci for generating data before the build - #10

Merged
jmeridth merged 1 commit into
mainfrom
feat/hugo-ci-prepare-command
Oct 1, 2026
Merged

jmeridth merged 1 commit into
mainfrom
feat/hugo-ci-prepare-command

Conversation

@jmeridth

@jmeridth jmeridth commented Oct 1, 2026

Copy link
Copy Markdown
Member

What/Why

Add an optional prepare-command to hugo-ci.yaml so a site can generate files (for example in data/) right before Hugo builds, with an optional prepare-secret exposed only to that step as $PREPARE_SECRET.

Proof it works

  • actionlint and zizmor report no findings on the changed workflow.
  • A caller site builds with a Node script as its prepare step, run locally with the same command the workflow runs.

Risk

Low. Both inputs default to empty, so existing callers skip the new steps and build exactly as before. The prepare step runs before any dependency install, so no third-party package code shares a step with the secret.

AI role

Claude Opus 5.5 wrote the workflow change and docs. The developer reviewed the design and approved opening this PR.

Review focus

  • The prepare step runs the caller's command through bash -c from an environment variable rather than a ${{ }} expression in run:.

…uild

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth added mark-ready-when-ready Auto-mark this draft PR ready for review once checks pass release Create a release when this PR merges labels Oct 1, 2026
@jmeridth jmeridth self-assigned this Oct 1, 2026
@github-actions github-actions Bot added the feature New feature or request label Oct 1, 2026
@github-actions
github-actions Bot marked this pull request as ready for review October 1, 2026 05:02
@github-actions github-actions Bot removed the mark-ready-when-ready Auto-mark this draft PR ready for review once checks pass label Oct 1, 2026
@jmeridth
jmeridth merged commit caace13 into main Oct 1, 2026
3 of 4 checks passed
@jmeridth
jmeridth deleted the feat/hugo-ci-prepare-command branch October 1, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request release Create a release when this PR merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant