Skip to content

PR preview - #149

Closed
aneeshsunganahalli wants to merge 4 commits into
fahimahammed:stagefrom
aneeshsunganahalli:PR-Preview
Closed

PR preview#149
aneeshsunganahalli wants to merge 4 commits into
fahimahammed:stagefrom
aneeshsunganahalli:PR-Preview

Conversation

@aneeshsunganahalli

@aneeshsunganahalli aneeshsunganahalli commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

Description

Security & Fork Handling:

Two separate events/jobs:

-pull_request job: Runs tests on PR code (safe because no secrets used)
-pull_request_target job: Queries Vercel API and posts comments (secure context with access to secrets)

For forked PRs:

-No secrets are exposed to the fork's code
-Vercel's GitHub integration automatically deploys the PR (outside of GitHub Actions)
-Our workflow uses the maintainer's token to find the deployment URL
-Comment is posted on the PR with the preview URL

##For internal PRs:
-Same process, but both jobs will run
-Vercel still handles the deployment

Related Issue

Fixes #136

Changes Made

  • Updated ...
  • Added ... .github/workflows/pr-preview.yml
  • Removed ...

Screenshots or GIFs (if applicable)

Checklist

  • Only the necessary files are modified; no unrelated changes are included.
  • Follows clean code principles (readable, maintainable, minimal duplication).
  • All changes are clearly documented.
  • Code has been tested (manual/automated) and verified against edge cases.
  • No breaking changes are introduced to existing functionality.
  • All new and existing tests passed (if tests exist).

Additional Notes

Setup Requirements:

-Connect GitHub repo to Vercel (one-time setup):

In Vercel dashboard, connect the repository and enable PR previews
Add these secrets to your GitHub repo:

-VERCEL_TOKEN - API token from Vercel
-VERCEL_PROJECT_ID - Your Vercel project ID
-VERCEL_PROJECT_NAME - The name of your project in Vercel (for fallback URLs)

@github-actions github-actions Bot 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.

Great job, @aneeshsunganahalli! Thanks for creating the pull request.
Soon the maintainers/owner will review it and provide you with feedback/suggestions.
Make sure to star this awesome repository and follow the account!

  • DevUI

@fahimahammed

Copy link
Copy Markdown
Owner

Thank you,

This discussion space is dedicated to DevUI!
We’d love to hear from you and get the community involved.

You can share your thoughts in different categories:

  • 💡 Ideas – Suggest new components, features, or improvements
  • :person_raising_hand: Q&A – Ask questions and get help from the community
  • 🗳️ Polls – Vote and share your opinions on upcoming decisions
  • 📢 General – Open conversations, announcements, and feedback

Jump in and start a discussion here 👉 https://github.com/fahimahammed/DevUI/discussions

Your feedback will help shape the future of DevUI

@aneeshsunganahalli

Copy link
Copy Markdown
Contributor Author

@fahimahammed Does this pull request not satisfy the requirements listed?

@fahimahammed

Copy link
Copy Markdown
Owner

not working properly

@aneeshsunganahalli

Copy link
Copy Markdown
Contributor Author

Did you enable the PR Review option on Vercel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] CI: Preview Deploy on Vercel/Netlify (PR Request)

2 participants