-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yaml
45 lines (39 loc) · 1.21 KB
/
buildspec.yaml
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
version: 0.2
# env:
# variables:
# RAILS_ENV: "production"
# parameter-store:
# build_ssh_key: "build_ssh_key"
phases:
install:
commands:
# Setup for Yarn
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update -y
- apt-get install -y yarn
# Install Yarn packages
- yarn global add serverless
- cd frontend
- yarn install
build:
commands:
- yarn build
post_build:
commands:
- yarn deploy
# # Clear S3 bucket.
# - aws s3 rm s3://${S3_BUCKET} --recursive
# - echo S3 bucket is cleared.
# # Copy dist folder to S3 bucket, As of Angular 6, builds are stored inside an app folder in distribution and not at the root of the dist folder
# - aws s3 cp dist s3://${S3_BUCKET}/${APP_NAME} --recursive
# - echo Build completed on `date`
# cache:
# paths:
# - 'vendor/bundle/**/*'
# - 'node_modules/**/*'
# artifacts:
# files:
# - '**/*'
# discard-paths: yes
# base-directory: 'dist*'