Skip to content

ci: replace Vercel previews with UiPath Coded App previews#895

Closed
fikewa-olatunji wants to merge 34 commits into
mainfrom
feat/coded-app-preview-deployments
Closed

ci: replace Vercel previews with UiPath Coded App previews#895
fikewa-olatunji wants to merge 34 commits into
mainfrom
feat/coded-app-preview-deployments

Conversation

@fikewa-olatunji

Copy link
Copy Markdown
Contributor

Summary

Deploys per-PR previews of apollo-docs, apollo-landing, apollo-design, and apollo-vertex as UiPath Coded Apps via @uipath/uip-go, replacing Vercel previews.

All deployment knowledge is owned by this repo, so deploy changes never require a uip-go release:

  • .uip-go.json defines the four deployment recipes (build commands, staged Next.js static exports, pagefind indexing, post-processing, AI Chat platform context).
  • Env-gated app sources replace the old uip-go build overlays: APOLLO_CODED_APP=1 switches the docs/vertex next configs to output: "export" with a basePath from APOLLO_CODED_APP_PATH, and the root/components index pages render the overview inline (static exports cannot redirect).
  • AI Chat runs live in previews: the demo reads NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_* (mapped in next.config.ts from the UIP_GO_AICHAT_* values uip-go resolves at deploy time) to call the platform directly — direct AgentHub/Data Fabric URLs, pinned org/tenant, identity logout origin, and the canonical OAuth redirect path. Dev keeps the same-origin proxy behavior via the existing fallbacks. Without a client id the chat renders a clear disabled state.
  • Workflow: builds and deploys each app per PR, posts a status comment with preview links, auto-registers the AI Chat redirect URI, and cleans up apps + redirect URIs on PR close (app deletion is best-effort due to a platform auth limitation).
  • Turbo hashes APOLLO_CODED_APP/APOLLO_CODED_APP_PATH so coded-app and regular builds never share cache entries; pagefind is a proper devDependency of each app that needs it.

Verification

Supersedes #874 and #883.

Deploy Apollo preview apps through UiPath Coded Apps and remove the Vercel PR workflow.
Moves the Coded App preview recipes from uip-go built-ins into .uip-go.json
and replaces the uip-go build overlays with env-gated app sources, so deploy
changes no longer require a uip-go release. Uses uip-go 0.2.0.

- .uip-go.json: apollo-docs/landing/design/vertex recipes; vertex declares
  aiChat redirectPath + scope; Next.js apps use pagefind: true
- next configs: APOLLO_CODED_APP=1 switches to output: "export" with basePath
  from APOLLO_CODED_APP_PATH; vertex maps UIP_GO_AICHAT_* into NEXT_PUBLIC_*
- root/components pages render the overview inline in coded app builds
  (static exports cannot redirect); mdx.d.ts committed for the mdx imports
- AI Chat reads NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_* with the previous alpha
  values as dev fallbacks: direct platform calls, pinned org/tenant, identity
  logout origin, canonical redirect path, disabled panel without a client id
- vertex logo src prefixed with the coded app path (basePath misses raw img)
- pagefind added to apollo-docs (previously borrowed from vertex via uip-go)
- turbo build hashes APOLLO_CODED_APP/APOLLO_CODED_APP_PATH so coded and
  normal builds do not share cache entries
Copilot AI review requested due to automatic review settings July 9, 2026 10:04
@fikewa-olatunji fikewa-olatunji requested a review from a team as a code owner July 9, 2026 10:04
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Jul 09, 2026, 03:21:11 AM
apollo-docs Ready Preview · Logs Jul 09, 2026, 03:21:11 AM
apollo-landing Ready Preview · Logs Jul 09, 2026, 03:21:11 AM
apollo-vertex Ready Preview · Logs Jul 09, 2026, 03:21:11 AM

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1948 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1718
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@github-actions github-actions Bot added the size:XXL 1,000+ changed lines. label Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the existing Vercel-based PR preview deployments with UiPath Coded App preview deployments driven by @uipath/uip-go, and updates the affected Next.js apps (Docs + Vertex) to support static exports under a per-preview sub-path and direct platform calls where needed (notably for Vertex AI Chat).

Changes:

  • Adds a new GitHub Actions workflow to deploy and clean up per-PR Coded App previews, and removes the old Vercel deployment workflow.
  • Introduces Coded App build gating for Next.js apps (static export + basePath handling) and updates Vertex AI Chat to support direct platform endpoints.
  • Adds uip-go deployment recipes (.uip-go.json), build cache env hashing, and supporting deps/ignores for local packaging artifacts.

Reviewed changes

Copilot reviewed 14 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
turbo.json Adds env-hashing for coded-app vs regular builds to avoid cache collisions.
pnpm-lock.yaml Locks pagefind for apps that need it and includes a lockfile metadata tweak.
apps/apollo-vertex/templates/AiChatTemplate.tsx Wires coded-app AI Chat parameters and adds a coded-app disabled state.
apps/apollo-vertex/templates/ai-chat/AiChatLoginGate.tsx Adds coded-app org/tenant handling and adjusts logout URL construction for coded-app flows.
apps/apollo-vertex/templates/ai-chat/AiChatAgentHubMode.tsx Switches platform API base URLs to direct calls when running as a coded app export.
apps/apollo-vertex/templates/ai-chat/ai-chat-example-utils.ts Adds coded-app env plumbing for AI Chat (direct base URL, redirect path, static org/tenant).
apps/apollo-vertex/next.config.ts Adds a coded-app export mode (output/export + basePath) and injects NEXT_PUBLIC_* vars for AI Chat.
apps/apollo-vertex/mdx.d.ts Adds TS module typing for .mdx imports.
apps/apollo-vertex/app/layout.tsx Prefixes logo asset path for coded-app basePath hosting.
apps/apollo-vertex/app/components/page.tsx Replaces redirect with inline overview rendering for static exports.
apps/apollo-docs/package.json Adds pagefind devDependency for docs search indexing.
apps/apollo-docs/next.config.mjs Enables coded-app static export + basePath when gated by env.
apps/apollo-docs/mdx.d.ts Adds TS module typing for .mdx imports.
apps/apollo-docs/app/page.tsx Replaces redirect with inline overview rendering for static exports.
.uip-go.json Defines coded-app deployment recipes for docs/landing/design/vertex, including pagefind and AI Chat settings.
.gitignore Ignores local UiPath coded-app packaging/build artifacts.
.github/workflows/vercel-deploy.yml Removes the old Vercel preview deployment workflow.
.github/workflows/preview-deploy.yml Adds the new uip-go powered coded-app preview deploy + PR comment + cleanup workflow.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread .github/workflows/preview-deploy.yml Outdated
with:
fetch-depth: 1
persist-credentials: false
ref: ${{ github.event.pull_request.base.sha }}
Comment on lines +29 to +31
export const AICHAT_REDIRECT_PATH =
process.env.NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_REDIRECT_PATH ||
"/auth_callback";
Comment on lines +53 to 56
const UIPATH_BASE_URL = AICHAT_DIRECT_BASE_URL || "https://alpha.uipath.com";

export function createUiPathSdk(
accessToken: string,
Comment on lines +27 to +29
permissions:
issues: write
pull-requests: write
Comment on lines +277 to +279
permissions:
issues: write
pull-requests: write
The close-event cleanup checked out the base sha, which does not have
.uip-go.json, so uip-go 0.2.0 found no vertex recipe and the redirect
removal failed. The recipes live on the PR branch; the deploy job
already runs head code with the same secrets and the job is fork-gated.
Also uses uip-go 0.2.1, which no longer scaffolds .uip-go.json during
cleanup-only runs.
Copilot AI review requested due to automatic review settings July 9, 2026 10:10
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package bundle size on this PR (no JS/TS source changes detected under packages/* or web-packages/*).

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 9.0% 43.82 MB 57.31 MB ±0
@uipath/apollo-react 34.5% 7.27 MB 27.60 MB ±0
@uipath/apollo-wind 40.3% 395.0 KB 2.57 MB −1 B
@uipath/ap-chat 85.8% 43.41 MB 55.85 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 18 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment on lines +27 to +30
permissions:
issues: write
pull-requests: write

Comment on lines +277 to +280
permissions:
issues: write
pull-requests: write

Comment on lines +93 to +97
<p className="mt-2 max-w-xl text-sm text-muted-foreground">
The demo needs browser calls to UiPath backend services that are
blocked by cross-origin preflight checks in the Coded App host. The
rest of Apollo Vertex is still available in this preview.
</p>
@fikewa-olatunji fikewa-olatunji deleted the feat/coded-app-preview-deployments branch July 9, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants