-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
18 lines (18 loc) · 913 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
language: go
before_install:
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
install:
- go get -v github.com/spf13/hugo
script:
- GIT_COMMIT_SHA=$(git rev-parse --verify HEAD)
- GIT_COMMIT_SHA_SHORT=$(git rev-parse --short HEAD)
- echo "SHA_SHORT $GIT_COMMIT_SHA_SHORT SHA $GIT_COMMIT_SHA"
- hugo
- aws configure set preview.cloudfront true
- aws s3 sync --acl "public-read" --sse "AES256" public/ s3://$BUCKET_NAME/ --exclude "images" --exclude "js" --exclude "css" --exclude "less" --exclude "css" --exclude "tr2017/*" --delete
- aws s3 sync --cache-control "max-age=2592000" --acl "public-read" --sse "AES256" --delete public/ s3://$BUCKET_NAME/ --exclude "*" --include "images" --include "js" --include "css" --include "less" --include "css" --delete
- aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*"
notifications:
email:
on_failure: always