Repository navigation
Only build once in PR workflows: Step 1 - #28975
Merged
Merged
Conversation
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
|
Preview URL: https://49d0b006.preview.developers.cloudflare.com |
Closed
mvvmm
marked this pull request as ready for review
March 13, 2026 20:45
mvvmm
requested review from
a team,
Oxyjun,
aninibread,
elithrar,
harshil1712 and
jonesphillip
as code owners
March 13, 2026 20:45
mvvmm
requested review from
a team,
ahaywood,
colbywhite and
kodster28
as code owners
March 13, 2026 20:45
kodster28
reviewed
Mar 17, 2026
kodster28
approved these changes
Mar 19, 2026
This was referenced Mar 19, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Note: We're adding back the compiles job, to meet the repo requirements of having a compiles job. So currently, this still builds twice. We will change the repo rules after merging this PR to only require build and validate. Then we will add another PR to remove the compiles job.
Previously, opening a PR triggered two separate full site builds: one in
ci.yml(for checks) and one inpublish-preview.yml(for preview deployment). This PR consolidates them into a single build.What changed
Deleted
publish-preview.yml— the separate workflow that built the site on every push to non-production branches is gone.Restructured
ci.ymlinto four focused jobs:build— runs the full site build, uploadsdist/as a GitHub Actions artifact. Handles link-check failures gracefully: if the build produced output but exited non-zero (link validation failure), the job still passes and sets an output flag so downstream jobs can report it without blocking the preview deploy.validate— downloads the artifact and runs ESLint, format checks, redirect validation, and tests. No rebuild needed.publish-preview— downloads the artifact and deploys to Cloudflare Workers preview. Replaces the build+deploy thatpublish-preview.ymlused to do. The computedBRANCH_SLUGis passed as a step output to thepost-preview-url-commentscript, so branch slug logic is no longer duplicated between shell and TypeScript.notify— posts or removes the CI failure comment on the PR.Updated bin scripts:
bin/post-pr-ci-failure-comment/index.ts— looks forBuildandValidatejobs instead of the oldCompilesjob name.bin/post-preview-url-comment/index.ts— readsBRANCH_SLUGfrom the environment (set by the deploy step) instead of computing it independently. Supports bothpull_requestandpushevent contexts for the PR number lookup.bin/post-preview-url-comment/util.ts— removedbranchToSubdomainsince the slug is now computed once in the shell deploy step and passed through.bin/post-preview-url-comment/index.node.test.ts— removedbranchToSubdomaintests.Testing
Note: Ignore the
Compilesjob in these screenshots, it would need to be removedWith invalid link, but otherwise successful build
With actual failing build