chore: Update CI workflow and enhance dynamic rendering for authentication routes
Some checks failed
CI / skip-ci-check (push) Successful in 1m27s
CI / skip-ci-check (pull_request) Successful in 1m27s
CI / lint-and-type-check (pull_request) Has been cancelled
CI / python-lint (pull_request) Has been cancelled
CI / test-backend (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / secret-scanning (pull_request) Has been cancelled
CI / dependency-scan (pull_request) Has been cancelled
CI / sast-scan (pull_request) Has been cancelled
CI / workflow-summary (pull_request) Has been cancelled
CI / lint-and-type-check (push) Successful in 2m5s
CI / python-lint (push) Successful in 1m51s
CI / test-backend (push) Successful in 2m39s
CI / build (push) Failing after 2m23s
CI / secret-scanning (push) Successful in 1m40s
CI / dependency-scan (push) Successful in 1m33s
CI / sast-scan (push) Successful in 2m45s
CI / workflow-summary (push) Successful in 1m25s

This commit adds environment variables for Resend API integration in the CI workflow, ensuring proper configuration for build processes. Additionally, it enforces dynamic rendering in the authentication routes to prevent Resend initialization during build, improving the application's performance and reliability. These changes contribute to a more robust development environment and enhance the overall user experience.
This commit is contained in:
Tanya 2026-01-07 13:13:16 -05:00
parent f038238a69
commit 36127ed97c
4 changed files with 11 additions and 0 deletions

View File

@ -250,6 +250,8 @@ jobs:
DATABASE_URL_AUTH: postgresql://postgres:postgres@localhost:5432/punimtag_auth
NEXTAUTH_SECRET: test-secret-key-for-ci
NEXTAUTH_URL: http://localhost:3001
RESEND_API_KEY: re_dummy_key_for_ci_build_only
RESEND_FROM_EMAIL: test@example.com
secret-scanning:
needs: skip-ci-check

View File

@ -3,6 +3,9 @@ import { prismaAuth } from '@/lib/db';
import { generatePasswordResetToken, sendPasswordResetEmail } from '@/lib/email';
import { isValidEmail } from '@/lib/utils';
// Force dynamic rendering to prevent Resend initialization during build
export const dynamic = 'force-dynamic';
export async function POST(request: NextRequest) {
try {
const body = await request.json();

View File

@ -4,6 +4,9 @@ import bcrypt from 'bcryptjs';
import { generateEmailConfirmationToken, sendEmailConfirmation } from '@/lib/email';
import { isValidEmail } from '@/lib/utils';
// Force dynamic rendering to prevent Resend initialization during build
export const dynamic = 'force-dynamic';
export async function POST(request: NextRequest) {
try {
const body = await request.json();

View File

@ -2,6 +2,9 @@ import { NextRequest, NextResponse } from 'next/server';
import { prismaAuth } from '@/lib/db';
import { generateEmailConfirmationToken, sendEmailConfirmationResend } from '@/lib/email';
// Force dynamic rendering to prevent Resend initialization during build
export const dynamic = 'force-dynamic';
export async function POST(request: NextRequest) {
try {
const body = await request.json();