version: 1 frontend: phases: preBuild: commands: - npm ci --cache .npm --prefer-offline build: commands: # Write env vars to .env.production for Next.js SSR runtime - env | grep -e AI_MODEL >> .env.production - env | grep -e AI_PROVIDER >> .env.production - env | grep -e OPENAI_API_KEY >> .env.production - env | grep -e NEXT_PUBLIC_ >> .env.production - npm run build artifacts: baseDirectory: .next files: - '**/*' cache: paths: - .next/cache/**/* - .npm/**/*