-
Notifications
You must be signed in to change notification settings - Fork 0
/
amplify_template.yml
79 lines (74 loc) · 2.15 KB
/
amplify_template.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
AWSTemplateFormatVersion: 2010-09-09
Resources:
AmplifyRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- amplify.amazonaws.com
Action:
- sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AdministratorAccess-Amplify
- arn:aws:iam::aws:policy/AWSCodeCommitReadOnly
- arn:aws:iam::aws:policy/AmazonS3FullAccess
AmplifyApp:
Type: "AWS::Amplify::App"
Properties:
Name: oncall-health
Repository:
Fn::ImportValue:
!Sub "oncall-health-repo-CloneUrlHttp"
Description: Oncall Health Vue App
EnvironmentVariables:
- Name: "_LIVE_UPDATES"
Value: "[{\"name\":\"Amplify CLI\",\"pkg\":\"@aws-amplify/cli\",\"type\":\"npm\",\"version\":\"latest\"}]"
CustomRules:
- Status: "404-200"
Source: "/<*>"
Target: "/index.html"
- Status: "200"
Source: "</^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/>"
Target: "/index.html"
BuildSpec: |-
version: 1
backend:
phases:
build:
commands:
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: dist
files:
- '**/*'
cache:
paths:
- node_modules/**/*
IAMServiceRole: !GetAtt AmplifyRole.Arn
AmplifyBranch:
Type: AWS::Amplify::Branch
Properties:
BranchName: master
AppId: !GetAtt AmplifyApp.AppId
Description: Master Branch
EnableAutoBuild: true
EnvironmentVariables:
- Name: USER_BRANCH
Value: prod
Stage: PRODUCTION
Outputs:
OutputAppId:
Value: !GetAtt AmplifyApp.AppId