When the Cloudflare Pages step in .github/workflows/publish-preview.yml fails, the Comment deployment URL on PR step (line 103) is skipped, so nothing is posted to the pull request.
The step has a fallback message for this case, but it is unreachable: a step with no if: condition only runs when every earlier step succeeded.
: `⚠️ Preview deployment step finished with status: ${status}.`;
Seen on #1132, where a transient Cloudflare API error (code: 8000000) failed the job. Re-running it unchanged succeeded.
Fix: add if: always() && steps.pr.outputs.number to the comment step. The second condition matters because Resolve and verify PR number can fail, leaving nothing to comment on.
Drafted with AI assistance.
When the Cloudflare Pages step in
.github/workflows/publish-preview.ymlfails, theComment deployment URL on PRstep (line 103) is skipped, so nothing is posted to the pull request.The step has a fallback message for this case, but it is unreachable: a step with no
if:condition only runs when every earlier step succeeded.Seen on #1132, where a transient Cloudflare API error (
code: 8000000) failed the job. Re-running it unchanged succeeded.Fix: add
if: always() && steps.pr.outputs.numberto the comment step. The second condition matters becauseResolve and verify PR numbercan fail, leaving nothing to comment on.Drafted with AI assistance.