From fbefae338e6e2c0004bbeb92f38ac03cd4e19456 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Thu, 26 Nov 2026 16:02:44 +0100 Subject: [PATCH] ci(docs): pass hugo flags through npx unchanged The docs build runs hugo through `npx --no hugo --minify --baseURL `. 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 --- .github/actions/hugo-build-action/action.yaml | 2 +- .github/actions/hugo-build-versioned-action/action.yaml | 2 +- .github/workflows/netlify-deploy-v2.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/hugo-build-action/action.yaml b/.github/actions/hugo-build-action/action.yaml index bea0cd82c..8ef16cfef 100644 --- a/.github/actions/hugo-build-action/action.yaml +++ b/.github/actions/hugo-build-action/action.yaml @@ -44,4 +44,4 @@ runs: BASE_URL: ${{ inputs.base-url }} shell: bash run: | - npx --no hugo --minify ${BASE_URL:+--baseURL $BASE_URL} -e _default + npx --no -- hugo --minify ${BASE_URL:+--baseURL $BASE_URL} -e _default diff --git a/.github/actions/hugo-build-versioned-action/action.yaml b/.github/actions/hugo-build-versioned-action/action.yaml index 933e282d2..733ca9123 100644 --- a/.github/actions/hugo-build-versioned-action/action.yaml +++ b/.github/actions/hugo-build-versioned-action/action.yaml @@ -81,4 +81,4 @@ runs: HUGO_ENV: ${{ inputs.hugo-env }} shell: bash run: | - npx --no hugo --minify ${BASE_URL:+--baseURL $BASE_URL} + npx --no -- hugo --minify ${BASE_URL:+--baseURL $BASE_URL} diff --git a/.github/workflows/netlify-deploy-v2.yaml b/.github/workflows/netlify-deploy-v2.yaml index 25607013e..3d5065f90 100644 --- a/.github/workflows/netlify-deploy-v2.yaml +++ b/.github/workflows/netlify-deploy-v2.yaml @@ -142,7 +142,7 @@ jobs: working-directory: ./docs env: HUGO_ENV: production - run: npx --no hugo --minify + run: npx --no -- hugo --minify - name: Publish (draft) uses: netlify/actions/cli@3185065f4ab2f6df6f2ef41ee013626e1c02a426 # master with: