-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
26 lines (25 loc) · 938 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
sudo: required
language: rust
rust: stable
install:
- cargo install mdbook --vers "0.3.5"
- sudo pip install awscli
script:
- (cd rusoto_docs_tester && cargo test)
- mdbook build # be nice if we could make this a debug build to save time. Or just download the binary.
# If the build is not a PR and is on the source branch, deploy the book to S3.
# CLI cloudfront invalidation is still in preview: http://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-invalidation.html
- |
if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "source" ]]; then
aws s3 sync --acl public-read --delete book/ s3://rusoto.org ;
aws configure set preview.cloudfront true ;
aws cloudfront create-invalidation --distribution-id E1LZO76WJHQFTB --paths "/*";
else
echo "conditions not right for publish"
fi
branches:
only:
- source
- auto
notifications:
email: false