diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 32586ed..3de6ba3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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 diff --git a/viewer-frontend/app/api/auth/forgot-password/route.ts b/viewer-frontend/app/api/auth/forgot-password/route.ts index bb8d0f3..0fdaaa2 100644 --- a/viewer-frontend/app/api/auth/forgot-password/route.ts +++ b/viewer-frontend/app/api/auth/forgot-password/route.ts @@ -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(); diff --git a/viewer-frontend/app/api/auth/register/route.ts b/viewer-frontend/app/api/auth/register/route.ts index eec521c..958636c 100644 --- a/viewer-frontend/app/api/auth/register/route.ts +++ b/viewer-frontend/app/api/auth/register/route.ts @@ -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(); diff --git a/viewer-frontend/app/api/auth/resend-confirmation/route.ts b/viewer-frontend/app/api/auth/resend-confirmation/route.ts index 19cc682..b2b984f 100644 --- a/viewer-frontend/app/api/auth/resend-confirmation/route.ts +++ b/viewer-frontend/app/api/auth/resend-confirmation/route.ts @@ -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();