-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamplify.yml
41 lines (35 loc) · 2.03 KB
/
amplify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: 1
frontend:
phases:
preBuild:
commands:
# Debug: Zeige alle relevanten Umgebungsvariablen an
- echo "Prüfe Environment Variablen:"
- env | grep -e DATABASE_URL -e SPOTIFY_CLIENT_ID -e NEXT_PUBLIC_POSTHOG_HOST -e NEXT_PUBLIC_POSTHOG_KEY -e DIGISTORE_KEY -e SPOTIFY_CLIENT_SECRET -e CLOUDFRONT_KEY -e S3_REGION -e COPECART_KEY -e S3_ACCESS_KEY_ID -e S3_SECRET_ACCESS_KEY -e S3_BUCKET_NAME -e OPTIMIZE_API_KEY -e DIRECT_DATABASE_URL -e NEXTAUTH_SECRET -e META_APP_ID -e META_APP_SECRET -e NEXTAUTH_URL -e GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET -e EMAIL_SERVER_USER -e EMAIL_SERVER_PASSWORD -e EMAIL_SERVER_HOST -e EMAIL_SERVER_PORT -e EMAIL_FROM
# Schreibe Variablen in die .env.production Datei
- echo "Erstelle .env.production Datei"
- env | grep -e DATABASE_URL -e SPOTIFY_CLIENT_ID -e NEXT_PUBLIC_POSTHOG_HOST -e NEXT_PUBLIC_POSTHOG_KEY -e DIGISTORE_KEY -e SPOTIFY_CLIENT_SECRET -e CLOUDFRONT_KEY -e S3_REGION -e COPECART_KEY -e S3_ACCESS_KEY_ID -e S3_SECRET_ACCESS_KEY -e S3_BUCKET_NAME -e OPTIMIZE_API_KEY -e DIRECT_DATABASE_URL -e NEXTAUTH_SECRET -e META_APP_ID -e META_APP_SECRET -e NEXTAUTH_URL -e GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET -e EMAIL_SERVER_USER -e EMAIL_SERVER_PASSWORD -e EMAIL_SERVER_HOST -e EMAIL_SERVER_PORT -e EMAIL_FROM > .env.production
- echo "Inhalt der .env.production Datei:"
- cat .env.production
# Bereinige und installiere Abhängigkeiten
- echo "Starte npm installation mit Cache Cleanup"
- npm cache clean --force
- npm ci --force --cache .npm --prefer-offline
build:
commands:
# Debugging: Zeige die aktuelle Node- und npm-Version an
- echo "Node Version:"
- node -v
- echo "NPM Version:"
- npm -v
# Starte den Build-Prozess
- echo "Starte Build"
- npm run build || (echo "❌ Build failed!" && exit 1)
artifacts:
baseDirectory: .next
files:
- "**/*"
cache:
paths:
- .next/cache/**/*
- .npm/**/*