cheatingchelsea/amplify.yml
Derek Slenk 3a035e9257 Update amplify.yml to inject environment variable
- Create .env.production file with YOUTUBE_API_KEY during build
- This ensures Next.js can access the environment variable

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 15:12:52 -04:00

21 lines
No EOL
446 B
YAML

version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- echo "YOUTUBE_API_KEY=$YOUTUBE_API_KEY" >> .env.production
- env | grep YOUTUBE_API_KEY || echo "YOUTUBE_API_KEY not found in environment"
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- .next/cache/**/*
buildPath: /
appRoot: /