Repository navigation
Surface Vercel PR previews reliably (Deployment + stamped comment) - #171
Merged
Merged
Conversation
The preview URL was posted as a single PR comment edited in place — GitHub doesn't notify on edits and it stays pinned in the timeline, so after the first deploy it looked stale and the real per-commit URLs were only in the CI logs. deploy.yml now: - publishes a GitHub Deployment + status per push (environment preview-pr-<n>), so the preview shows in the PR's Deployments box and on the head commit, refreshed each push; - stamps the single upserted comment with the short SHA + UTC time so an in-place edit is unmistakably current; - extracts the *.vercel.app URL by pattern (not `tail -1`) and fails the step on make deploy's real exit code or an empty URL, so a broken capture can't post an empty/stale link; - adds the deployments: write permission. docs/ci-cd.md updated to describe the two surfaces. Closes #170 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
🔺 Vercel preview: https://cv-jq6xb10ci-bruno-valerios-projects.vercel.app commit |
This was referenced Jul 4, 2026
This branch was successfully deployed
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
Preview URLs were surfaced as a single PR comment edited in place. GitHub doesn't notify on edits
and the comment stays pinned at its original timeline position, so after the first deploy it looked
stale — on #156 the real per-commit URLs (
cv-dp2pt2exx…,cv-1ght27m3n…,cv-bzvlalugy…) were onlyvisible in the Deploy logs. All runs succeeded; the issue was purely surfacing.
Change (
.github/workflows/deploy.yml)preview-pr-<n>,transient+auto_inactive), so the preview shows in the PR's Deploymentsbox and on the head commit and refreshes every push. Non-fatal (try/catch) so a deployment hiccup
can't fail the deploy or block the comment.
so an in-place edit is unmistakably current;
per_page: 100on the lookup.*.vercel.appURL by pattern (nottail -1); fail the step onmake deploy's real exit code or an empty URL, so a broken capture can't post an empty link(same spirit as make lint: surface Super-Linter's real exit code (wrapper masks failures) #169).
deployments: writepermission.docs/ci-cd.mdupdated to describe both surfaces.Verification
make lint-actions(actionlint 1.7.1), fullmake lint(Super-Linter — YAML + Markdown + allvalidators "linted successfully", real exit 0), and
make lint-fastall pass.if:impliessuccess()(failed deploy skips surfacing), the shell capture fails correctly on the no-secretspath, the Deployments API params are valid (
required_contexts: []+auto_merge: false→ 201),auto_inactiveis scoped per-PR, and nothing weakens the required "Build and deploy" check.preview comment below.
Closes #170
🤖 Generated with Claude Code