-
Notifications
You must be signed in to change notification settings - Fork 1
/
amplify.yml
39 lines (39 loc) · 1.6 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
version: 1
frontend:
phases:
preBuild:
commands:
- touch .env.production
# Injecting env variables to prod build (see https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html#access-env-vars)
# HOST NEXT_PUBLIC_HOST (used by other env variables)
- env | grep -e NEXT_PUBLIC_HOST >> .env.production
# Tiptap Pro Registry (see: https://cloud.tiptap.dev/pro-extensions)
- env | grep -e TIPTAP_PRO_TOKEN >> .env.production
# AWS for S3
- env | grep -e _AWS_ACCESS_KEY_ID -e _AWS_SECRET_ACCESS_KEY -e _AWS_REGION -e _AWS_BUCKET -e MAP_BUCKET >> .env.production
# next-auth (see https://authjs.dev/reference/nextjs#environment-variable-inferrence)
- env | grep -e NEXTAUTH_URL -e NEXTAUTH_SECRET -e AUTH_REDIRECT_PROXY_URL -e AUTH_SECRET >> .env.production
# operation fix the fucking auth AUTH_TRUST_HOST to true
- export AUTH_TRUST_HOST=true
# Github Auth
- env | grep -e GITHUB_CLIENT_ID -e GITHUB_CLIENT_SECRET >> .env.production
# Google Auth
- env | grep -e GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET -e GOOGLE_REDIRECT_URI >> .env.production
# Google API Key
- env | grep -e GOOGLE_DRIVE_API_KEY >> .env.production
- export NODE_OPTIONS=--max-old-space-size=16384
- nvm use 20
- corepack enable
- yarn cache clean
- yarn install
build:
commands:
- yarn build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- 'node_modules/**/*'
- '.next/cache/**/*'