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
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.
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 everywhere2026-08-21 05:23:47 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Run cd docs/siteinstead of showing the actualwranglerdeploy command. Gitea/GitHub Actions always auto-groups a multi-linerun:script underRun <first line>, and there's no annotation to override that label directly — withcd docs/siteas the first line, that's what got shown.working-directory: docs/sitekey and dropping thecdline from the script, so the first (and only meaningful) line is thenpx wrangler pages deploy ...command, which is what now shows in the group label.cdleft in the file: "Build documentation site" mixed two working directories in a single step (python3 docs/build-manual.py --sitefrom the repo root, thennpm ci/npx astro buildfromdocs/site). Split it into two steps — "Generate site content" at the repo root, "Build documentation site" withworking-directory: docs/site— so both can dropcdtoo. The whole workflow is nowcd-free and consistent.Manual Verification Checklist
build-docsjob'sDeploy to Cloudflare Pagesstep on the next run and confirm the collapsed log group now readsRun npx --yes wrangler pages deploy ...instead ofRun cd docs/sitefish-config-docsCloudflare Pages project as before)fix(ci): use working-directory instead of cd for Cloudflare deployto fix(ci): use working-directory instead of cd everywhere