-
Notifications
You must be signed in to change notification settings - Fork 35
/
webspec.yml
36 lines (35 loc) · 1.16 KB
/
webspec.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
version: 0.2
phases:
install:
runtime-versions:
docker: 18
dotnet: 2.2
python: 3.7
ruby: 2.6
pre_build:
commands:
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- IMAGE_TAG=${COMMIT_HASH:=latest}
- echo Initializing Git Repo
- git init
- git remote add origin $FULL_REPO_URL
- git fetch
- git checkout -f "$CODEBUILD_RESOLVED_SOURCE_VERSION"
- echo "Initializing and updating Git submodules..."
- git submodule update --init --recursive
- gem install asciidoctor
- echo Install Hugo
- wget https://github.com/gohugoio/hugo/releases/download/v0.71.0/hugo_extended_0.71.0_Linux-64bit.tar.gz
- tar -xzf hugo_extended_0.71.0_Linux-64bit.tar.gz
- mv hugo /usr/local/bin/hugo
- hugo version
build:
commands:
- echo Build Website
- echo "Checking theme directory:"
- pwd
- ls -lar
- hugo -D -d public
- echo Deploy Copy Website to S3 Bucket
- aws s3 sync public/ s3://${WEB_SITE_BUCKET}/ --delete
- aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_DISTRO_ID} --paths /\*