forked from code4romania/code4.ro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (26 loc) · 788 Bytes
/
.travis.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
language: generic
env:
HUGO_VERSION: "0.53"
cache:
pip: true
directories:
- node_modules
install:
- curl -sSL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz
- tar -xzf /tmp/hugo.tar.gz -C $HOME/bin
script:
- npm install
- npm run build
- hugo --minify --baseURL $BASE_URL
before_deploy:
- pyenv global system 3.6
- pip3 install --user awscli
deploy:
provider: script
script: aws s3 sync public s3://$S3_BUCKET_NAME --region $S3_BUCKET_REGION --acl public-read --delete
skip_cleanup: true
on:
branch: master
after_deploy:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"