-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (37 loc) · 1007 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
33
34
35
36
37
language: ruby
sudo: required
cache: bundler
rvm:
- 2.5.1
before_script:
- bundle
script:
- bundle exec rake test:production && rake build:production
install:
- pip install --user awscli
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $S3_BUCKET_NAME
region: $AWS_REGION
skip_cleanup: true
local_dir: _site
on:
branch: master
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $S3_STAGING_BUCKET_NAME
region: $AWS_REGION
skip_cleanup: true
local_dir: _site
on:
branch: staging
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
after_deploy:
- aws configure set preview.cloudfront true
- test $TRAVIS_BRANCH = "master" && aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
- test $TRAVIS_BRANCH = "staging" && aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_STAGING_DISTRIBUTION_ID --paths "/*"