-
Notifications
You must be signed in to change notification settings - Fork 0
/
amplify.yml
41 lines (41 loc) · 1.76 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: 0.1
resources:
build:
spec: {
"size": "BUILD_GENERAL1_MEDIUM"
}
frontend:
phases:
preBuild:
commands:
- nvm use $VERSION_NODE_20
- node -v
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
- cat .npmrc
- |
if [ "${AWS_BRANCH}" = "main" ]; then
echo "Fetching parameters from AWS Parameter Store for the main branch";
aws ssm get-parameter --name ${PARAMETER_STORE_PROD} --with-decryption --query "Parameter.Value" --output text > .env.production;
fi
- yarn install
build:
commands:
- if [ "${AWS_BRANCH}" = "development" ]; then cp -fv .env.development .env.production; fi
- if [ "${AWS_BRANCH}" = "investax-dev" ]; then cp -fv .env.development .env.production; fi
- if [ "${AWS_BRANCH}" = "staging" ]; then cp -fv .env.staging .env.production; fi
- if [ "${AWS_BRANCH}" = "staging" ]; then cp -fv .env.staging .env.test; fi
- if [ "${AWS_BRANCH}" = "clientspace" ]; then cp -fv .env.staging .env.production; fi
- if [ "${AWS_BRANCH}" = "clientspace" ]; then cp -fv .env.staging .env.test; fi
- if [ "${AWS_BRANCH}" = "staging-client-demo" ]; then cp -fv .env.staging-client-demo .env.production; fi
- if [ "${AWS_BRANCH}" = "staging-client-demo" ]; then cp -fv .env.staging-client-demo .env.test; fi
- if [ "${AWS_BRANCH}" = "upgrade-wallet-connect" ]; then cp -fv .env.staging-client-demo .env.production; fi
- if [ "${AWS_BRANCH}" = "upgrade-wallet-connect" ]; then cp -fv .env.staging-client-demo .env.test; fi
- node -v
- yarn run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*