forked from PagerDuty/incident-response-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (29 loc) · 826 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
language: python
python:
- 2.7
cache: pip
install:
- pip install awscli
- pip install mkdocs
- pip install mkdocs-material==0.2.4
script:
- mkdocs build --clean
deploy:
on:
branch: master
repo: 'PagerDuty/incident-response-docs'
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $AWS_S3_BUCKET
skip_cleanup: true
local_dir: site
acl: public_read
cache_control: "max-age=86400"
after_deploy:
# Delete any old files from the S3 bucket.
- aws s3 sync site/ s3://$AWS_S3_BUCKET --acl public-read --exclude "*.py*" --delete
# Allow `awscli` to make requests to CloudFront.
- aws configure set preview.cloudfront true
# Invalidate every object.
- aws cloudfront create-invalidation --distribution-id $AWS_CF_DISTRIBUTION_ID --paths "/*"