Skip to content

chore(devtools): deploy preview frontend builds in CI#8315

Merged
jmelahman merged 1 commit intomainfrom
jamison/preview
Feb 11, 2026
Merged

chore(devtools): deploy preview frontend builds in CI#8315
jmelahman merged 1 commit intomainfrom
jamison/preview

Conversation

@jmelahman
Copy link
Copy Markdown
Contributor

@jmelahman jmelahman commented Feb 11, 2026

Description

Deploys frontend builds to Vercel connected to the https://cloud.onyx.app backend for QA.

It uses a custom GitHub Actions workflow (following this guide) to:

  1. future-proof the compute cost
  2. give us a little more flexibility with the UX (I find the Github deployment status a bit noisy and the native Vercel comments a bit distracting -- I just want the deployed URL plainly imo).

In the Vercel Dashboard there are two environment variables set to enable this feature, namely:

  • OVERRIDE_API_PRODUCTION=true
  • INTERNAL_URL=https://cloud.onyx.app/api

How Has This Been Tested?

#8312 (comment)

Additional Options

  • [Required] I have considered whether this PR needs to be cherry-picked to the latest beta branch.
  • [Optional] Override Linear Check

Summary by cubic

Adds a GitHub Actions workflow to build and deploy preview frontend builds to Vercel for every web change, then posts a clean preview URL on the PR. Previews point to the cloud backend (https://cloud.onyx.app) for QA.

  • New Features
    • Runs on pushes to non-main branches affecting web/**.
    • Uses Vercel CLI to pull env, build, and deploy prebuilt artifacts.
    • Posts/updates a single PR comment with the preview URL, commit, and timestamp.
    • Previews use Vercel env vars: OVERRIDE_API_PRODUCTION=true and INTERNAL_URL=https://cloud.onyx.app/api.

Written for commit e09a857. Summary will update on new commits.

fix command

nit

hm

npx

prod?

Revert "prod?"

This reverts commit d1e0f6d.

working-directory

INTERNAL_URL npx

.env.production

nit

opus

nit

undo install vercel

nit

pull
@jmelahman jmelahman requested a review from a team as a code owner February 11, 2026 00:42
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name=".github/workflows/preview.yml">

<violation number="1" location=".github/workflows/preview.yml:14">
P2: Grant `issues: write` so the workflow can update PR comments. Without it, the `gh api`/`gh pr comment` calls can fail due to insufficient permissions.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

Adds a new GitHub Actions workflow (.github/workflows/preview.yml) that triggers on non-main pushes affecting web/**, uses the Vercel CLI to pull env/config, build, and deploy a preview, and then attempts to post/update a PR comment with the deployed URL.

This fits into the repo as CI/devtools automation intended to provide a stable preview frontend deployment tied to PR branches for QA against the cloud backend.

Confidence Score: 2/5

  • Not safe to merge as-is due to likely CI failures in the preview workflow.
  • The workflow’s Vercel commands appear to run from repo root instead of web/, and the PR-comment step builds a multi-line bash string in a way that can cause a parse/formatting failure, preventing comment updates. Fixing these is needed for the workflow to reliably deploy and report preview URLs.
  • .github/workflows/preview.yml

Important Files Changed

Filename Overview
.github/workflows/preview.yml Adds a workflow to deploy Vercel preview builds and comment the URL on PRs; current version likely fails due to missing web working-directory and brittle/invalid bash string construction for the PR comment body.

Sequence Diagram

sequenceDiagram
  participant GH as GitHub PR
  participant GHA as GitHub Actions (preview.yml)
  participant Vercel as Vercel CLI/API
  participant Deploy as Vercel Preview Deployment

  GH->>GHA: pull_request / workflow_dispatch event
  GHA->>GHA: Checkout repo
  GHA->>GHA: Install deps + build frontend
  GHA->>Vercel: vercel pull (env/config)
  GHA->>Vercel: vercel build
  GHA->>Vercel: vercel deploy (prebuilt)
  Vercel-->>GHA: Deployment URL
  GHA-->>GH: Comment/Status with Preview URL
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@jmelahman jmelahman enabled auto-merge February 11, 2026 00:57
@jmelahman jmelahman added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit 6a045db Feb 11, 2026
82 checks passed
@jmelahman jmelahman deleted the jamison/preview branch February 11, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants