Skip to content

ci(docs): pass hugo flags through npx unchanged - #2007

Merged
hkad98 merged 1 commit into
gooddata:masterfrom
hkad98:jkd/npx-hugo-args
Nov 26, 2026
Merged

hkad98 merged 1 commit into
gooddata:masterfrom
hkad98:jkd/npx-hugo-args

Conversation

@hkad98

@hkad98 hkad98 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Netlify Deploy on master (after #2005) fails in the Hugo build: https://github.com/gooddata/gooddata-python-sdk/actions/runs/45843885586

Error: command error: unknown command "https://www.gooddata.ai/docs/python-sdk" for "hugo"

The build runs npx --no hugo --minify --baseURL <url>. Without a -- separator npm parses the flags after the package name as its own, so hugo receives the bare URL. Reproduced locally with npm 10 and 11.

The move from a global hugo install to npx came with the zizmor hardening (#2002). Every release since then failed earlier, at the Python setup fixed in #2005, so this step was never reached; no docs have been published since v1.79.1.

The fix adds -- in both Hugo build actions and in the draft deploy workflow, so every argument reaches hugo.

Risk: nonprod — docs build only.

Summary by CodeRabbit

  • Chores
    • Updated the Hugo build commands used for standard builds, versioned builds, and Netlify deployments to explicitly separate npx options from Hugo commands and arguments.
    • These changes affect build automation; no end-user features or site content changed.

The docs build runs hugo through `npx --no hugo --minify --baseURL
<url>`. Without a `--` separator npm parses the flags after the
package name as its own, so hugo receives the bare URL and exits with
`unknown command "https://www.gooddata.ai/docs/python-sdk"`.
Reproduced locally with npm 10 and 11.

The switch from a global hugo install to npx came with the zizmor
hardening. Every release since failed earlier, at the Python setup, so
the production docs deploy has not reached this step until now; no
docs have been published since v1.79.1.

Add the separator to both hugo build actions and to the draft deploy
workflow, so every argument reaches hugo.

jira: trivial
risk: nonprod
@hkad98
hkad98 requested review from lupko and pcerny as code owners November 26, 2026 15:02
@hkad98
hkad98 enabled auto-merge November 26, 2026 15:02
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Hugo build commands in two GitHub Actions and the Netlify deployment workflow now place -- between the npx options and the Hugo command.

Changes: Hugo build commands

Layer / File(s) Summary
Separate npx options from Hugo
.github/actions/hugo-build-action/action.yaml, .github/actions/hugo-build-versioned-action/action.yaml, .github/workflows/netlify-deploy-v2.yaml
Each Hugo invocation now adds -- after npx --no. The Netlify command retains --minify.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

Merge Risk: Minimal · up to fbefa

This change fixes how Hugo arguments are passed in the docs build actions and the Netlify deploy workflow. It affects only docs builds and no actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci(docs): pass hugo flags through npx unchanged" matches the changeset. The three workflow and action files add the -- separator to the npx --no Hugo invocations, so flags and the base …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "ci(docs): pass hugo flags through npx unchanged" matches the changeset. The three workflow and action files add the -- separator to the npx --no Hugo invocations, so flags and the base URL reach Hugo instead of being parsed by npm. The title names the scope (docs) and the mechanism (npx argument passing). It is specific and concise, and a reviewer scanning history can identify the main change.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the build command line,
A dash now marks where Hugo starts its sign.
The npx flags stay in their place,
While --minify keeps its case.
The burrow hums; the docs take flight.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 87f2ab44-6f5d-4510-b6f2-f02e3a3e19ff
Commits

Reviewing files that changed from the base of the PR and between 117e2d3 and fbefae3.

Files selected for processing: 3

  • .github/actions/hugo-build-action/action.yaml
  • .github/actions/hugo-build-versioned-action/action.yaml
  • .github/workflows/netlify-deploy-v2.yaml

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@hkad98
hkad98 merged commit 242c463 into gooddata:master Nov 26, 2026
8 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