-
Notifications
You must be signed in to change notification settings - Fork 34
/
buildspec.yml
34 lines (33 loc) · 983 Bytes
/
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
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
commands:
- apt-get update
- curl -L -o hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.76.5/hugo_extended_0.76.5_Linux-64bit.deb
- dpkg -i hugo.deb
pre_build:
commands:
- echo In pre_build phase..
- echo Current directory is $CODEBUILD_SRC_DIR
- git submodule update --init --depth 1 --recursive
- npm install --only=dev
build:
commands:
- echo "******** Building Hugo site ********"
- HUGO_ENV="production" hugo --verbose
post_build:
commands:
- echo "******** Uploading to S3 ********"
- aws s3 sync --delete public/ "s3://${BUCKET_NAME}"
- aws s3api put-bucket-website --bucket "${BUCKET_NAME}" --website-configuration file://s3-website-config.json
#artifacts:
#files:
# - location
# - location
#discard-paths: yes
#base-directory: location
cache:
paths:
- 'node_modules/**/*'