-
Notifications
You must be signed in to change notification settings - Fork 0
/
staging-buildspec.yaml
26 lines (24 loc) · 1.13 KB
/
staging-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
version: 0.2
environment_variables:
plaintext:
HUGO_VERSION: "0.55.4"
HUGO_SHA256: "fca0223d05e6bf9992a2050480635ea73fe1633ebab0c64b4fe991d0dbc7a0af"
phases:
install:
commands:
- curl -Ls https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz
- echo "${HUGO_SHA256} /tmp/hugo.tar.gz" | sha256sum -c -
- tar xf /tmp/hugo.tar.gz -C /tmp
- mv /tmp/hugo /usr/bin/hugo
- rm -rf /tmp/hugo*
pre_build:
commands:
- rm -rf /tmp/hugo_cache/
- rm -rf ./public
build:
commands:
- HUGO_ENV=staging hugo -D -F -b https://staging-blog.spuul.com/ --ignoreCache --minify --enableGitInfo --cleanDestinationDir
post_build:
commands:
- aws --region ap-south-1 s3 sync --exclude '*' --include '*.html' --include '*.xml' --include '*.json' --cache-control 'max-age=10' --acl public-read public/ s3://staging.blog.spuul.com/
- aws --region ap-south-1 s3 sync --exclude '*.html' --exclude '*.xml' --exclude '*.json' --cache-control 'max-age=3600' --acl public-read public/ s3://staging.blog.spuul.com/