ci: Comment the Vercel build log on PRs whose build fails - #1918
Open
marcleblanc2 wants to merge 1 commit into
Open
ci: Comment the Vercel build log on PRs whose build fails#1918marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
Vercel shows build logs only to members of its team, so contributors saw a red X and a login wall. On vercel.deployment.error this posts the tail of the build log on the PR; on the next successful build the same comment is updated to say the failure is fixed. Fork PRs are skipped so the project-scoped Vercel token is never used on their behalf.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
marcleblanc2
enabled auto-merge (squash)
September 11, 2026 11:19
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.
Problem
Vercelcheck link to the Vercel inspector, which only Vercel team members can openSolution
vercel.deployment.error(the samerepository_dispatchchannelpreview-links.ymluses), comment the tail of the build log on the PR, like the links / redirects / CSpell checks dovercel.deployment.success, update that comment to ✅. The success path only reads PR comments; it does not touch VercelToken
VERCEL_TOKENrepo secret is a token scoped to thesourcegraph-docsproject only, expiring 2026-12-10repository_dispatchruns the workflow and script frommain, so a PR can't change the code the token is handed toTested
repository_dispatchto the workflow onmain. After merge:gh workflow run vercel-build-report.yml -f id=dpl_9VtUD163jZ6grMQwdYpnvQesAPeh -f state=error -f sha=<1913 head sha>Dry-run output (abridged)
Amp thread