Enhancement: Feature branches now creates a deployment only on PRs.#26
Enhancement: Feature branches now creates a deployment only on PRs.#26
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
🚀 Preview Deployment:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the deployment workflow strategy to create preview deployments only for pull requests, rather than on every feature branch push. The change introduces a more controlled and resource-efficient deployment approach by using PR numbers for database naming and lifecycle management.
Key Changes:
- Replaced push-based preview deployments with PR-triggered deployments
- Simplified database naming from sanitized branch names to PR numbers (
pr-{number}) - Split deployment workflows: separate workflows for PR previews and dev branch deployments
- Updated cleanup to trigger on PR closure instead of branch deletion
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/preview_deploy.yml |
Removed the old push-based preview deployment workflow that triggered on all non-main branches |
.github/workflows/pr_preview.yml |
Added new PR-based preview deployment workflow with automatic PR commenting and simplified database naming |
.github/workflows/dev_deploy.yml |
Added dedicated workflow for dev branch deployments with schema synchronization |
.github/workflows/database_cleanup.yml |
Updated to trigger on PR closure instead of branch deletion, with simplified database naming |
.github/scripts/generate_db_name.sh |
Removed shell script for sanitizing branch names, no longer needed with PR number-based naming |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| TURSO_API_TOKEN: ${{ secrets.TURSO_API_TOKEN }} | ||
| run: | | ||
| turso db destroy ${{env.SAFE_BRANCH_NAME}} --yes || echo "Database already gone" | ||
| DB_NAME="pr-${{ github.event.pull_request.number }}" |
There was a problem hiding this comment.
The workflow will attempt to run even when triggered via workflow_dispatch, but in that case github.event.pull_request.number will be undefined, causing the database name to be malformed as "pr-". This will likely fail the cleanup step, but with a confusing error message.
Consider adding a condition to check that the event is a pull_request event, or handle the workflow_dispatch case explicitly by requiring manual input of the PR number.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Enhancement: Switched from Google Analytics to Vercel Analytics * Enhancement: Improved auth toaster * [FEAT] Email verification (#6) * Enhancement: Send verification email after successful signup * Feature: Added email verification handler page * Fix: Wrapped useSearchParams in a Suspense component * Update src/app/signup/page.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/app/auth/VerifyEmailPage.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/app/auth/VerifyEmailPage.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Enhancement: Switch to Jetbrains IDE and qodana for code quality analysis * Remove Qodana from Github workflow (#10) * Fix: Remove Qodana from Github workflows * Fix: Remove Qodana config file * Refactor: Made Navbar and User Dropdown components to be re-used on the dashboard page * Chore: Add sidebar component from shadcn/ui * Refactor: Update Navbar component to accept className prop * Refactor: Update UserDropdown component to accept tirggerProps prop * Feat: Created the dashboard navbar * Chore: Update to Next.js 16.0.1 * Migration from Firebase ecosystem to Better-Auth + Turso (and Drizzle ORM) (#13) * Feat: Migrate from Firebase Auth to Better-Auth using Turso DB and Drizzle ORM * Fix: Fixed SignUp page not redirecting * Refactor: Renamed login page to sign-in page and signup page to sign-up page * Removed unused cookie import Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * [FEAT] 2FA Auth (#15) * Enhancement: Send verification email after successful signup * Feature: Added email verification handler page * Fix: Wrapped useSearchParams in a Suspense component * chore: Updated shadcn dependencies * Style: Changed destructive color * Feat: Created user settings page * Feat: Add Jetbrains IDE to .gitignore * chore: Added use-mobile hook for shadcn * Feat: Created preferences page in user settings * Feat: Enhance AuthLogic to handle multiple email verification modes * Feat: Created base page for security and connections settings * fix: Removed unused var and fixed type error * Enhancement: Improved email update feedback * Enhancement: Improved responsive layout * Fix: Update account preferences link to point to the correct route * Fix: Logout user when a sensitive action that invalidates the user's tokens is done * Docs: Improved API routes comments * Fix: Removed session cookie validation caching * Refactor: Make revokeSessionCookie parameter clearer * Feat: Added display name setting in user preferences * Enhancement: Title and content in settings cards are now separated by a separator * Enhancement: Display the display name in the homepage navbar dropdown * Feat: Implemented account deletion * Refactor: Changed Connections page name to Databases * Style: Changed security's page title to match the style of the other pages * Refactor: Remove Security and Databases pages from user settings sidebar * Feat: Migrated account deletion from firebase auth to better-auth * Feat: Migrated display name from firebase auth to better-auth * Fat: Migrated email change and verification from firebase auth to better-auth * Feat: Implemented email sending using nodemailer * Chore: Add twoFactor plugin to client and server auth configuration * Chore: Migrated DB to support two factor * Chore: Update .gitignore to include VSCode directories * Chore: Installed QR Code component * Refactor: Extracted Password Dialog into a component * Chore: Add input group component * Feat: Add 2FA Enabling in user settings * Feat: Add 2FA login dialog * Refactor: Changed delete account dialog to use password dialog component * Refactor: Remove unused authClient session data in TwoFactorSecurity component * Refactor: Make a two factor dialog wrapper to display different 2FA dialogs * Fix typo in loading toast message during account creation * Feat: Add a trustDevice checkbox in TOTP Auth flow * Feat: Make a two factor method switcher * Refactor: Clean up code by removing unused imports and fixing typos across multiple components * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: Added missing closing tag for InputGroupButton --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Feat/user settings (#16) * Enhancement: Send verification email after successful signup * Feature: Added email verification handler page * Fix: Wrapped useSearchParams in a Suspense component * chore: Updated shadcn dependencies * Style: Changed destructive color * Feat: Created user settings page * Feat: Add Jetbrains IDE to .gitignore * chore: Added use-mobile hook for shadcn * Feat: Created preferences page in user settings * Feat: Enhance AuthLogic to handle multiple email verification modes * Feat: Created base page for security and connections settings * fix: Removed unused var and fixed type error * Enhancement: Improved email update feedback * Enhancement: Improved responsive layout * Fix: Update account preferences link to point to the correct route * Fix: Logout user when a sensitive action that invalidates the user's tokens is done * Docs: Improved API routes comments * Fix: Removed session cookie validation caching * Refactor: Make revokeSessionCookie parameter clearer * Feat: Added display name setting in user preferences * Enhancement: Title and content in settings cards are now separated by a separator * Enhancement: Display the display name in the homepage navbar dropdown * Feat: Implemented account deletion * Refactor: Changed Connections page name to Databases * Style: Changed security's page title to match the style of the other pages * Refactor: Remove Security and Databases pages from user settings sidebar * Feat: Migrated account deletion from firebase auth to better-auth * Feat: Migrated display name from firebase auth to better-auth * Fat: Migrated email change and verification from firebase auth to better-auth * Feat: Implemented email sending using nodemailer * Chore: Add twoFactor plugin to client and server auth configuration * Chore: Migrated DB to support two factor * Chore: Update .gitignore to include VSCode directories * Chore: Installed QR Code component * Refactor: Extracted Password Dialog into a component * Chore: Add input group component * Feat: Add 2FA Enabling in user settings * Feat: Add 2FA login dialog * Refactor: Changed delete account dialog to use password dialog component * Refactor: Remove unused authClient session data in TwoFactorSecurity component * Refactor: Make a two factor dialog wrapper to display different 2FA dialogs * Fix typo in loading toast message during account creation * Feat: Add a trustDevice checkbox in TOTP Auth flow * Feat: Make a two factor method switcher * Refactor: Clean up code by removing unused imports and fixing typos across multiple components * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: Added missing closing tag for InputGroupButton * Feat/Refactor: Added backup code 2FA authentication, and moved dialogs out of the dialog folder * Refactor: Changed action text of backup code item from Regenerate to Manage and conditionally render the item if the user has 2FA enabled * Fix: Set lenght of backup code to 11 (10 letters + a dash) * Feat: Encrypt backup codes * Chore: Installed react-downloadfile-hook * Feat: Created ViewBackupCodeDialog to display backup codes to the user * Feat: Implement ViewBackupCodeDialog in user settings. Display backup codes after enabling 2FA and after regenerating them. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: Cleanup unused Dialog folder * Security: Patched React2Shell * Feat/user settings (#22) * Enhancement: Send verification email after successful signup * Feature: Added email verification handler page * Fix: Wrapped useSearchParams in a Suspense component * chore: Updated shadcn dependencies * Style: Changed destructive color * Feat: Created user settings page * Feat: Add Jetbrains IDE to .gitignore * chore: Added use-mobile hook for shadcn * Feat: Created preferences page in user settings * Feat: Enhance AuthLogic to handle multiple email verification modes * Feat: Created base page for security and connections settings * fix: Removed unused var and fixed type error * Enhancement: Improved email update feedback * Enhancement: Improved responsive layout * Fix: Update account preferences link to point to the correct route * Fix: Logout user when a sensitive action that invalidates the user's tokens is done * Docs: Improved API routes comments * Fix: Removed session cookie validation caching * Refactor: Make revokeSessionCookie parameter clearer * Feat: Added display name setting in user preferences * Enhancement: Title and content in settings cards are now separated by a separator * Enhancement: Display the display name in the homepage navbar dropdown * Feat: Implemented account deletion * Refactor: Changed Connections page name to Databases * Style: Changed security's page title to match the style of the other pages * Refactor: Remove Security and Databases pages from user settings sidebar * Feat: Migrated account deletion from firebase auth to better-auth * Feat: Migrated display name from firebase auth to better-auth * Fat: Migrated email change and verification from firebase auth to better-auth * Feat: Implemented email sending using nodemailer * Chore: Add twoFactor plugin to client and server auth configuration * Chore: Migrated DB to support two factor * Chore: Update .gitignore to include VSCode directories * Chore: Installed QR Code component * Refactor: Extracted Password Dialog into a component * Chore: Add input group component * Feat: Add 2FA Enabling in user settings * Feat: Add 2FA login dialog * Refactor: Changed delete account dialog to use password dialog component * Refactor: Remove unused authClient session data in TwoFactorSecurity component * Refactor: Make a two factor dialog wrapper to display different 2FA dialogs * Fix typo in loading toast message during account creation * Feat: Add a trustDevice checkbox in TOTP Auth flow * Feat: Make a two factor method switcher * Refactor: Clean up code by removing unused imports and fixing typos across multiple components * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: Added missing closing tag for InputGroupButton * Feat/Refactor: Added backup code 2FA authentication, and moved dialogs out of the dialog folder * Refactor: Changed action text of backup code item from Regenerate to Manage and conditionally render the item if the user has 2FA enabled * Fix: Set lenght of backup code to 11 (10 letters + a dash) * Feat: Encrypt backup codes * Chore: Installed react-downloadfile-hook * Feat: Created ViewBackupCodeDialog to display backup codes to the user * Feat: Implement ViewBackupCodeDialog in user settings. Display backup codes after enabling 2FA and after regenerating them. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Feat: Created Database tab under user settings * Enhancement: Made database table headers bold * Feat: Created database table schema * Feat: Created buisness logic for database handling * Feat: Created API routes for database logic * Feat: Created client API wrapper for DB api routes * Security: Patched React2Shell * Chore: Install react-query * Feat: Wrap layout in QueryClientProvider * Feat: Connected DatabaseTable ui to backend using react-query * Enhancement: Added tooltip to update email address button * Feat: Created database linking dialog * Feat: Created database deletion dialog * Feat: Created database rename dialog * Feat: Created change password dialog * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: Fixed FormControl duplicate in database rename dialog * Fix: Typo in clientMessages in errors util file * Fix: In external database service, the CheckUserExit function wasn't waiting for the db to finish querying the user profile * Enhancement: Added zod error messages to rename database dialog --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Chore: Uninstall old react-query package * Enhancement: Feature branches now creates a deployment only on PRs. (#26) * Enhancement: Feature branches now creates a deployment only on PRs. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: Fixed workflow_dispatch lacking pr number parameter --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Enhancement: Ignore deployment workflows if changes are not affecting the site or db * Enhancement: Added README.md to paths-ignore and added paths-ignore to PR preview workflow * Potential fix for code scanning alert no. 4: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
No description provided.