-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathamplify.yml
46 lines (46 loc) · 1.89 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
version: 1
backend:
phases:
preBuild:
commands:
- export BASE_PATH=$(pwd)
- yum install -y gcc openssl-devel bzip2-devel libffi-devel python3.8-pip
- cd /opt && wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
- cd /opt && tar xzf Python-3.8.2.tgz
- cd /opt/Python-3.8.2 && ./configure --enable-optimizations
- cd /opt/Python-3.8.2 && make altinstall
- pip3.8 install --user pipenv
- ln -fs /usr/local/bin/python3.8 /usr/bin/python3
- ln -fs /usr/local/bin/pip3.8 /usr/bin/pip3
- cd $BASE_PATH
build:
commands:
- |
if [ -n $ACCESS_KEY ] && [ -n $DOMAIN ] && [ -n $DURATION ] && [ -n $IP_ADDRESS ] && [ -n $RESOURCE_PATH ]; then
echo "# Updating amplify/backend/function/getcookie/paramters.json"
echo "{\"AccessKey\":\"$ACCESS_KEY\",\"Domain\":\"$DOMAIN\",\"Duration\":$DURATION,\"IpAddress\":\"$IP_ADDRESS\",\"ResourcePath\":\"$RESOURCE_PATH\"}" > amplify/backend/function/getcookie/parameters.json
fi
- cat amplify/backend/function/getcookie/parameters.json
- |
if [ -n $DOMAINALLOWLIST ]; then
echo "# Updating amplify/backend/function/singedcookieba6e1384PreSignup/parameters.json "
echo "{\"modules\":\"email-filter-allowlist\",\"resourceName\":\"singedcookieba6e1384PreSignup\",\"DOMAINALLOWLIST\":\"$DOMAINALLOWLIST\"}" > amplify/backend/function/singedcookieba6e1384PreSignup/parameters.json
fi
- cat amplify/backend/function/singedcookieba6e1384PreSignup/parameters.json
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: dist
files:
- '**/*'
cache:
paths:
- node_modules/**/*