-
Notifications
You must be signed in to change notification settings - Fork 1
/
amplify.yml
62 lines (60 loc) · 1.44 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: 1
backend:
phases:
build:
commands:
- npm i
# - node scripts/fetch-team-provider-info.js
- cat amplify/team-provider-info.json
- '# Execute Amplify CLI with the helper script'
# - node scripts/updateTags.js
# - node scripts/deploy.js
# - amplifyPush --simple
- amplifyPush -e $AWS_BRANCH --simple
- amplify status
# frontend:
# phases:
# preBuild:
# commands:
# - yarn install
# - nvm use 10
# - npm install --silent --global expo-cli
# - |-
# if [ -f yarn.lock ]; then
# yarn
# elif [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
# npm ci
# else
# npm install
# fi
# build:
# commands:
# - 'expo build:web'
# artifacts:
# baseDirectory: web-build
# files:
# - '**/*'
# cache:
# paths:
# - node_modules/**/*
# - $(npm root --global)/**/*
frontend:
phases:
preBuild:
commands:
- nvm use $VERSION_NODE_12
- cd web && npm i && cd ..
build:
commands:
- nvm use $VERSION_NODE_12
- ls -al
- cp aws-exports.js web/src/aws-exports.js
- cd web && npm run build && mv build/ ../build && cd ..
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- web/node_modules/**/*