-
Notifications
You must be signed in to change notification settings - Fork 17
/
amplify.yml
40 lines (39 loc) · 1.55 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
version: 0.1
env:
variables:
BACKEND_URL_PRODUCTION: 'https://api.postman.gov.sg/v1'
BACKEND_URL_PRODUCTION_MOM: 'https://api-mom.postman.gov.sg/v1'
BACKEND_URL_STAGING: 'https://api-staging.postman.gov.sg/v1'
SENTRY_ORG: 'open-government-products-re'
SENTRY_PROJECT: 'postmangovsg-frontend'
REACT_APP_SENTRY_DSN: 'https://b7b979b458ee470a86efff9ef1653b50@o399364.ingest.sentry.io/5261024'
REACT_APP_TITLE: 'Postman.gov.sg'
REACT_APP_DESCRIPTION: 'Postman.gov.sg enables public officers to send templated messages to many recipients'
frontend:
phases:
preBuild:
commands:
- nvm install 16
- if [ "${AWS_BRANCH}" = "master" ]; then
export REACT_APP_BACKEND_URL=${BACKEND_URL_PRODUCTION} &&
export REACT_APP_ENVIRONMENT="production" &&
export REACT_APP_IMG_SERVER_URL="https://legacy.postman.gov.sg/v1";
elif [ "${AWS_BRANCH}" = "momgovsg" ]; then
export REACT_APP_BACKEND_URL=${BACKEND_URL_PRODUCTION_MOM} &&
export REACT_APP_ENVIRONMENT="production-02";
else
export REACT_APP_BACKEND_URL=${BACKEND_URL_STAGING} &&
export REACT_APP_ENVIRONMENT="staging";
fi
- cd shared && npm ci && cd ..
- cd frontend && npm ci
- export REACT_APP_SENTRY_RELEASE=$(npm run --silent get-sentry-release)
build:
commands:
- npm run build
- npm run upload-source-map
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: frontend/build
files:
- '**/*'