fix(ci): use working-directory instead of cd everywhere #113

Merged
rootiest merged 2 commits from fix-ci-deploy-step-group-label into main 2026-08-21 05:39:43 +00:00
Owner

Summary

  • The "Deploy to Cloudflare Pages" step's collapsed log group was labeled Run cd docs/site instead of showing the actual wrangler deploy command. Gitea/GitHub Actions always auto-groups a multi-line run: script under Run <first line>, and there's no annotation to override that label directly — with cd docs/site as the first line, that's what got shown.
  • Fixed by moving the directory change into the step's working-directory: docs/site key and dropping the cd line from the script, so the first (and only meaningful) line is the npx wrangler pages deploy ... command, which is what now shows in the group label.
  • Found one more cd left in the file: "Build documentation site" mixed two working directories in a single step (python3 docs/build-manual.py --site from the repo root, then npm ci/npx astro build from docs/site). Split it into two steps — "Generate site content" at the repo root, "Build documentation site" with working-directory: docs/site — so both can drop cd too. The whole workflow is now cd-free and consistent.

Manual Verification Checklist

  • Watch the build-docs job's Deploy to Cloudflare Pages step on the next run and confirm the collapsed log group now reads Run npx --yes wrangler pages deploy ... instead of Run cd docs/site
  • Confirm the deploy itself still succeeds (uploads to the fish-config-docs Cloudflare Pages project as before)
  • Confirm "Generate site content" and "Build documentation site" both run successfully in sequence and the site still builds/deploys correctly
## Summary - The "Deploy to Cloudflare Pages" step's collapsed log group was labeled `Run cd docs/site` instead of showing the actual `wrangler` deploy command. Gitea/GitHub Actions always auto-groups a multi-line `run:` script under `Run <first line>`, and there's no annotation to override that label directly — with `cd docs/site` as the first line, that's what got shown. - Fixed by moving the directory change into the step's `working-directory: docs/site` key and dropping the `cd` line from the script, so the first (and only meaningful) line is the `npx wrangler pages deploy ...` command, which is what now shows in the group label. - Found one more `cd` left in the file: "Build documentation site" mixed two working directories in a single step (`python3 docs/build-manual.py --site` from the repo root, then `npm ci`/`npx astro build` from `docs/site`). Split it into two steps — "Generate site content" at the repo root, "Build documentation site" with `working-directory: docs/site` — so both can drop `cd` too. The whole workflow is now `cd`-free and consistent. ## Manual Verification Checklist - [x] Watch the `build-docs` job's `Deploy to Cloudflare Pages` step on the next run and confirm the collapsed log group now reads `Run npx --yes wrangler pages deploy ...` instead of `Run cd docs/site` - [x] Confirm the deploy itself still succeeds (uploads to the `fish-config-docs` Cloudflare Pages project as before) - [x] Confirm "Generate site content" and "Build documentation site" both run successfully in sequence and the site still builds/deploys correctly
rootiest added 1 commit 2026-08-21 05:21:39 +00:00
Gitea/GitHub Actions auto-groups a multi-line run: script under
"Run <first line>". With `cd docs/site` as the first line, the
collapsed log tree showed that instead of the actual wrangler deploy
command. Moving the directory change to the step's working-directory
key drops cd from the script entirely, so the group label now reflects
the command that's actually running.
rootiest added 1 commit 2026-08-21 05:23:37 +00:00
The only other cd left in the workflow mixed two working directories
in one step: docs/build-manual.py --site runs from the repo root, then
npm ci/astro build need docs/site. Split into two steps so each can
use working-directory instead, keeping the whole file cd-free and
consistent with the Cloudflare deploy step's fix.
rootiest changed title from fix(ci): use working-directory instead of cd for Cloudflare deploy to fix(ci): use working-directory instead of cd everywhere 2026-08-21 05:23:47 +00:00
rootiest merged commit c25bb3b105 into main 2026-08-21 05:39:43 +00:00
rootiest deleted branch fix-ci-deploy-step-group-label 2026-08-21 05:39:43 +00:00
Sign in to join this conversation.