-
Notifications
You must be signed in to change notification settings - Fork 1
/
amplify.yml
32 lines (32 loc) · 1006 Bytes
/
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
version: 1
frontend:
phases:
preBuild:
commands:
- NODE_VERSION=$(cat .tool-versions | grep '^nodejs' | sed 's/nodejs //')
- echo "Using Node.js version $NODE_VERSION"
- nvm install "$NODE_VERSION"
- node -v
- |
if [[ "${AWS_BRANCH}" != "main" && "${AWS_BRANCH}" != "staging" ]]; then
PREVIEW_URL="https://${AWS_BRANCH}.${AWS_APP_ID}.amplifyapp.com";
NEXTAUTH_URL=$PREVIEW_URL;
echo "PREVIEW_URL=$PREVIEW_URL" >> .env;
fi
- echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env
- yarn config set nodeLinker node-modules
- yarn -v
- yarn
- yarn disable-telemetry
- yarn gql
- timeout 1m yarn onesky:download || echo "yarn onesky:download timed out after 1 minute or failed with an error"
build:
commands:
- yarn build:amplify
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- '.next/cache/**/*'