feat(ci): add webapp PR preview deploy workflow#6191
Conversation
Preview Deploy
|
There was a problem hiding this comment.
1 issue found across 1 file
Confidence score: 4/5
- This PR is likely safe to merge with minimal risk: the reported issue is moderate (5/10) and appears limited to CI comment behavior rather than application runtime functionality.
- In
.github/workflows/preview-webapp.yml, only checking part of the comment history before posting can create duplicate preview marker comments on long-lived PRs, which may add noise and confusion in review threads. - Pay close attention to
.github/workflows/preview-webapp.yml- ensure the workflow searches all comment pages before deciding whether to create a new marker comment.
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
204082a to
29f3e21
Compare
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3da8e38051
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 997f53c1f4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57aa42d9f2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Problem
No way to preview webapp (
app.nango.dev) changes on open PRs without manually deploying toapp-development.nango.dev, overwriting the shared dev environment.Solution
Adds
.github/workflows/preview-webapp.yml— on every PR open/push/reopen:🔄 Deployingcomment immediately (updates in-place on re-runs, no duplicates)npm run ts-build && npm run -w @nangohq/webapp build) with the developmentAPI_DOMAINPREVIEW_APP_UI_ROLE) — uses thepull_requestOIDC sub claim enabled by NangoHQ/nango-infra#124packages/webapp/dist/tos3://$PREVIEW_APP_UI_BUCKET/previews/pr-<number>/✅ Readyor❌ FailedPreview URLs:
https://pr-<number>.app-development.nango.devDepends on NangoHQ/nango-infra#124 being applied and the following GitHub Actions variables set in the
developmentenvironment:PREVIEW_APP_UI_BUCKETPREVIEW_APP_UI_DISTRIBUTION_IDPREVIEW_APP_UI_ROLECloses NAN-5648
Testing
🔄 Deployingcomment appears immediatelyhttps://pr-<number>.app-development.nango.devloads the webapp once infra is appliedFork PR security validation
Validated via #6231.
For
pull_requestjobs from forks, GitHub enforces two hard limits that cannot be overridden from within the workflow:GITHUB_TOKEN— even if the workflow requestspull-requests: write, GitHub caps fork PR jobs at read-onlyWorth noting: for
pull_requestevents, GitHub runs the workflow file from the fork's head — so a fork contributor could modify the workflow (e.g. remove theifguard). Theifguard is therefore an efficiency measure to skip wasted CI builds, not a security boundary. The two limits above are enforced by GitHub regardless of workflow content.ifguard presentifguard removedCredentials could not be loaded from any providers