-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildspec.yml
46 lines (37 loc) · 1.03 KB
/
buildspec.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: 0.2
env:
variables:
HOME: /opt/buildhome
YARN_FLAGS: --ignore-engines
HUGO_VERSION: 0.40.1
#parameter-store:
# key: "value"
# key: "value"
phases:
#install:
#commands:
# - command
# - command
pre_build:
commands:
- cp -r $CODEBUILD_SRC_DIR /opt/buildhome/repo
# Aws downloaded zip replaces symlinks with text files
- rm /opt/buildhome/repo/hugo/content/representative_offices
- ln -s /opt/buildhome/repo/hugo/representative_offices/representative_offices /opt/buildhome/repo/hugo/content/representative_offices
build:
commands:
- build npm run build
post_build:
commands:
- . $HOME/python2.7/bin/activate
- aws s3 sync $HOME/repo/public/ s3://$APP_BUCKET --delete
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths '/*'
# - command
artifacts:
files:
- public/**/*
#discard-paths: yes
base-directory: /opt/buildhome/repo
cache:
paths:
- /opt/buildhome/cache