diff --git a/buildspec.yml b/buildspec.yml index 563126875..d0904a53e 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -2,18 +2,24 @@ version: 0.2 environment_variables: plaintext: + HUGO_VERSION: "0.40.1" + STOUT_VERSION: "1.3.1" BUCKET_NAME: "open-security-summit.com-cdn" phases: + install: + commands: + # Install hugo + - curl -Ls https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz + - tar xf /tmp/hugo.tar.gz -C /usr/local/bin pre_build: commands: - cd $CODEBUILD_SRC_DIR && git clone https://github.com/devcows/hugo-universal-theme.git themes/oss-owasp build: commands: - - hugo -v + - hugo post_build: commands: - - minify -r -o public/ public/ - - s3deploy -source=public/ -region=eu-west-2 -bucket=${BUCKET_NAME} + - aws s3 sync --acl "public-read" --sse "AES256" public/ s3://${BUCKET_NAME} - aws configure set preview.cloudfront true - aws cloudfront create-invalidation --distribution-id E22WEBPD6529KA --paths '/*'