Skip to content

chore: replace Vercel native GitHub integration with explicit GitHub Actions deploy workflows#521

Merged
tstirrat15 merged 7 commits intomainfrom
preview-deploy-workflow
Feb 26, 2026
Merged

chore: replace Vercel native GitHub integration with explicit GitHub Actions deploy workflows#521
tstirrat15 merged 7 commits intomainfrom
preview-deploy-workflow

Conversation

@samkim
Copy link
Member

@samkim samkim commented Feb 26, 2026

Summary

Moves Vercel deployments from the native Vercel GitHub integration to explicit GitHub Actions workflows, giving us full control over when and how deployments are triggered.

vercel.json disables Vercel's automatic git-based deployments so only the workflows trigger deploys.

Preview workflow (vercel-preview.yml):

  • Runs on pull requests; gates deployment on collaborator write access to prevent unauthorized deployments from forks
  • Posts a live status comment on the PR (building / ready / failed) with a link to the preview URL
  • Sets a stable branch alias (docs-git-<branch>-authzed.vercel.app) in addition to the per-deploy URL
  • Branch name is sanitized and truncated to 46 chars to stay within the 63-char DNS label limit

Production workflow (vercel-production.yml):

  • Runs on push to main and supports manual workflow_dispatch
  • Creates a GitHub Deployment record and updates its status on success or failure
  • Writes a job summary with deployment details

All action references are pinned to commit hashes for supply chain security.

Test plan

  • Open a PR as a collaborator — verify a preview deploy triggers and a status comment appears
  • Open a PR as an external contributor — verify the no-permission comment is posted and no deploy runs
  • Merge to main — verify the production workflow runs and the GitHub Deployment is marked successful

Additional changes:

  • Fixed all yamllint warnings and errors across workflow files — quoted string scalars, added --- document-start
    markers, replaced bare on: with "on": to avoid YAML truthy ambiguity
  • Disabled the yamllint comments rule to avoid requiring double-spaces before inline action pin comments (e.g. # v6)
  • Removed the Lint Markdown step from the lint workflow — markdownlint has conflicting rules with oxfmt, which
    already covers formatting checks
  • Removed the lint:markdown script from package.json for the same reason; added lint:yaml script to run yamllint
    locally
  • Fixed the preview deploy success comment so the "Ready" status links to the workflow run rather than the preview
    URL

🤖 Generated with Claude Code

samkim and others added 2 commits February 17, 2026 16:20
Implements automated deployment workflows to replace Vercel's built-in Git integration:
- Preview deployments for pull requests with status comments
- Production deployments on main branch pushes
- Disables Vercel Git integration to prevent duplicate deployments

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Pin all GitHub Action references to commit hashes
- Add DNS label truncation to branch sanitization in preview deploy
- Fix --prod flag order in production deploy command
- Set auto-inactive: false on production GitHub Deployment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Preview deployment status for this pull request.

Name Status Preview Updated (UTC)
docs 🟢 Ready Visit Preview Feb 26, 2026 01:32am

samkim and others added 3 commits February 25, 2026 17:05
Quote all string scalars, use "on": to avoid truthy warnings, add
document-start markers, and fix inline comment spacing to comply with
the quoted-strings yamllint rules enforced in CI.

Also adds pnpm lint:yaml script to run yamllint locally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
samkim and others added 2 commits February 25, 2026 17:26
markdownlint has conflicting rules with oxfmt, and oxfmt already covers
formatting checks in this workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Disables the comments spacing rule to avoid requiring 2 spaces before
inline hash comments on action pin references. Also removes the
lint:markdown script from package.json as markdownlint conflicts with
oxfmt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@miparnisari miparnisari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try it

@tstirrat15 tstirrat15 merged commit 5835a86 into main Feb 26, 2026
12 of 13 checks passed
@tstirrat15 tstirrat15 deleted the preview-deploy-workflow branch February 26, 2026 19:41
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants