Skip to content

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

Open
fikewa-olatunji wants to merge 1 commit into
mainfrom
feat/coded-app-previews
Open

ci: replace Vercel previews with UiPath Coded App previews#896
fikewa-olatunji wants to merge 1 commit into
mainfrom
feat/coded-app-previews

Conversation

@fikewa-olatunji

@fikewa-olatunji fikewa-olatunji commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Deploys apollo-docs, apollo-landing, apollo-design, and apollo-vertex as UiPath Coded Apps via @uipath/uip-go, replacing the Vercel deployments — both per-PR previews and the stable production sites for merged pages.

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: 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 and production: 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.
  • Preview workflow (preview-deploy.yml): 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 (checks out the PR head so the recipes are present; app deletion is best-effort due to a platform auth limitation).
  • Production workflow (production-deploy.yml): on every push to main, updates the stable Coded Apps of the merged pages (apollo-docs, apollo-landing, apollo-design, apollo-vertex) — same recipes and deploy pattern, stable names/paths. The README demo links point at these.
  • Turbo hashes APOLLO_CODED_APP, APOLLO_CODED_APP_PATH, and UIP_GO_AICHAT_* so coded-app and regular builds never share cache entries; pagefind is a proper devDependency of each app that needs it.

Verification

  • Deploy pipeline verified end-to-end: all four previews deploy Ready and return 200, including the vertex AI Chat page.
  • AI Chat verified on a deployed Coded App preview: sign-in with the canonical redirect URI, AgentHub and Conversational Agent modes, and Data Fabric chart tools all work against staging.
  • Regular (non-preview) builds are unaffected: coded-app behavior is gated behind env vars that are unset in dev/prod.
  • The production workflow reuses the exact deploy pattern of the preview workflow (same recipes, secrets, and uip-go invocation) with stable app names; it runs on merge to main.

Copilot AI review requested due to automatic review settings July 9, 2026 10:38
@fikewa-olatunji fikewa-olatunji requested a review from a team as a code owner July 9, 2026 10:38
@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:35:01 PM
apollo-docs Ready Preview · Logs Jul 09, 2026, 03:35:01 PM
apollo-landing Ready Preview · Logs Jul 09, 2026, 03:35:01 PM
apollo-vertex Ready Preview · Logs Jul 09, 2026, 03:35:01 PM

@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

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 preview deployment system with per-PR preview deployments hosted as UiPath Coded Apps (via @uipath/uip-go). It also introduces “coded-app” build gating for the Next.js-based apps (docs/vertex) so they can be statically exported under a sub-path, and updates the Apollo Vertex AI Chat demo to support direct platform calls in coded-app previews.

Changes:

  • Removes the Vercel preview workflow and adds a new GitHub Actions workflow that deploys/updates/cleans up UiPath Coded App previews per PR and posts preview links back to the PR.
  • Adds .uip-go.json deployment recipes (build/export/postprocess/pagefind/AI Chat redirect metadata) and ignores local packaging artifacts.
  • Updates apollo-docs and apollo-vertex to support static exports under a basePath and to avoid redirects that can’t be served in static export mode; updates Vertex AI Chat to use coded-app-injected platform settings.

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 APOLLO_CODED_APP* env vars to Turbo build hashing to avoid cache collisions between coded-app and regular builds.
pnpm-lock.yaml Lockfile update to reflect the new pagefind dependency.
apps/apollo-vertex/templates/AiChatTemplate.tsx Passes coded-app-specific auth config into the chat/auth providers and adds a coded-app “disabled” state.
apps/apollo-vertex/templates/ai-chat/AiChatLoginGate.tsx Uses baked-in org/tenant info for coded-app builds and adjusts identity logout origin for direct platform auth.
apps/apollo-vertex/templates/ai-chat/AiChatAgentHubMode.tsx Switches Data Fabric / AgentHub base URLs to direct platform calls when in coded-app mode.
apps/apollo-vertex/templates/ai-chat/ai-chat-example-utils.ts Adds coded-app-aware env plumbing for AI Chat configuration (base URL, redirect path, org/tenant injection).
apps/apollo-vertex/next.config.ts Adds coded-app static export mode + basePath handling and injects NEXT_PUBLIC_* AI Chat values for previews.
apps/apollo-vertex/mdx.d.ts Adds MDX module typing to support importing .mdx files into TS/TSX.
apps/apollo-vertex/app/layout.tsx Prefixes the logo path with the coded-app basePath to make static export assets resolve correctly.
apps/apollo-vertex/app/components/page.tsx Replaces redirect with inline MDX rendering in coded-app static export mode.
apps/apollo-docs/package.json Adds pagefind as a devDependency for coded-app/static export indexing.
apps/apollo-docs/next.config.mjs Adds coded-app static export mode + basePath handling for previews.
apps/apollo-docs/mdx.d.ts Adds MDX module typing to support importing .mdx files into TS/TSX.
apps/apollo-docs/app/page.tsx Replaces redirect with inline MDX rendering in coded-app static export mode.
.uip-go.json Adds uip-go deployment recipes for docs/landing/design/vertex coded-app previews (including AI Chat redirect metadata).
.gitignore Ignores local UiPath coded-app packaging artifacts.
.github/workflows/vercel-deploy.yml Removes the Vercel preview deployment workflow.
.github/workflows/preview-deploy.yml Adds the coded-app preview deployment workflow (deploy, PR comment update, cleanup).
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread apps/apollo-vertex/templates/AiChatTemplate.tsx
Comment thread apps/apollo-vertex/templates/ai-chat/ai-chat-example-utils.ts Outdated
Comment thread .github/workflows/preview-deploy.yml
Comment thread .github/workflows/preview-deploy.yml
Comment thread apps/apollo-vertex/templates/ai-chat/ai-chat-example-utils.ts
@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% 394.9 KB 2.57 MB −10 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 review requested due to automatic review settings July 9, 2026 10:51
@fikewa-olatunji fikewa-olatunji force-pushed the feat/coded-app-previews branch from 02aba86 to 2cfffe1 Compare July 9, 2026 10:51

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 2 comments.

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

Comment thread .github/workflows/preview-deploy.yml
Comment thread .github/workflows/preview-deploy.yml

@CalinaCristian CalinaCristian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this PR removes the functionality of having previews of merged to develop (production) pages.

We need to maintain this

Copilot AI review requested due to automatic review settings July 9, 2026 22:04
@fikewa-olatunji fikewa-olatunji force-pushed the feat/coded-app-previews branch from 2cfffe1 to ff62fd1 Compare July 9, 2026 22:04

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 16 out of 20 changed files in this pull request and generated 2 comments.

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

Comment thread turbo.json Outdated
Comment thread apps/apollo-vertex/templates/AiChatTemplate.tsx
Copilot AI review requested due to automatic review settings July 9, 2026 22:15
@fikewa-olatunji fikewa-olatunji force-pushed the feat/coded-app-previews branch from ff62fd1 to 81ca2bc Compare July 9, 2026 22:15
@fikewa-olatunji

fikewa-olatunji commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@CalinaCristian good catch, restored in the latest push. Merged pages now stay deployed too: a new production-deploy.yml runs on every push to main and updates stable Coded Apps of the same four sites (apollo-docs / apollo-landing / apollo-design / apollo-vertex, e.g. https://engdogfood.staging.uipath.host/apollo-vertex/), with AI Chat enabled on vertex. So production pages move from Vercel to Coded Apps along with the PR previews, and the README demo links now point at the stable apps.

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 16 out of 20 changed files in this pull request and generated 1 comment.

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

Comment thread .uip-go.json
Deploys per-PR previews of apollo-docs, apollo-landing, apollo-design, and
apollo-vertex as UiPath Coded Apps via @uipath/uip-go 0.2.1, replacing the
Vercel preview workflow.

All deployment knowledge lives in this repo, so deploy changes never require
a uip-go release:

- .uip-go.json holds the four deployment recipes (staged Next.js static
  exports, pagefind indexing, static-next-export post-processing, AI Chat
  platform context via aiChat redirectPath + scope)
- APOLLO_CODED_APP=1 gates static-export mode in the docs and vertex next
  configs (basePath from APOLLO_CODED_APP_PATH); index pages render the
  overview inline in coded app builds since static exports cannot redirect
- the vertex AI Chat demo reads NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_* (mapped
  from the UIP_GO_AICHAT_* values uip-go resolves at deploy time) to call
  the platform directly; dev keeps the same-origin proxies, and the demo
  renders a disabled state when no client id is configured
- the preview workflow builds, deploys, comments preview links, registers
  the AI Chat redirect URI, and cleans up on PR close (checkout of the PR
  head so the recipes are present; app deletion stays best-effort)
- turbo hashes APOLLO_CODED_APP/APOLLO_CODED_APP_PATH; pagefind is a real
  devDependency of apollo-docs
Copilot AI review requested due to automatic review settings July 9, 2026 22:26
@fikewa-olatunji fikewa-olatunji force-pushed the feat/coded-app-previews branch from 81ca2bc to a0f403b Compare July 9, 2026 22:26

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 16 out of 20 changed files in this pull request and generated no new comments.

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

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.

3 participants