forked from xrally/xrally-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (33 loc) · 1.12 KB
/
.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
33
language: python
env:
- TOXENV=build
install:
- pip install tox
- pip install awscli
script:
- tox
deploy:
# Control deployment by setting a value for `on`. Setting the `branch`
# option to `master` means Travis will only attempt a deployment on
# builds of your repo's master branch (e.g., after you merge a PR).
on:
branch: master
provider: s3
# You can refer to environment variables from Travis repo settings!
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
region: $AWS_DEFAULT_REGION
# Name of the S3 bucket to which your site should be uploaded.
bucket: xrally.org
# Prevent Travis from deleting your built site so it can be uploaded.
skip_cleanup: true
# Path to a directory containing your built site.
local_dir: site
# Set the Cache-Control header.
cache_control: "max-age=21600"
acl: public_read
after_deploy:
# Allow `awscli` to make requests to CloudFront.
- aws configure set preview.cloudfront true
# Invalidate every object in the targeted distribution.
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"