dist: trusty
sudo: false
language: node_js
node_js:
  - "6"

install: true

before_script:
  - pip install --user awscli
  - npm install

script:
  - npm run dist
  - aws s3 sync --delete dist/ s3://$S3_BUCKET_NAME/ --metadata-directive REPLACE --cache-control max-age=31536000
  - aws s3 cp dist/index.html s3://$S3_BUCKET_NAME/ --metadata-directive REPLACE --cache-control no-cache
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths '/*'

dist: xenial
language: node_js
node_js:
  - "6"

install: true

before_script:
  - pip install --user awscli
  - npm install

script:
  - npm run dist
  - aws s3 sync --delete dist/ s3://$S3_BUCKET_NAME/ --metadata-directive REPLACE --cache-control max-age=31536000
  - aws s3 cp dist/index.html s3://$S3_BUCKET_NAME/ --metadata-directive REPLACE --cache-control no-cache
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths '/*'

Switch to new Xenial environment, should fix some Python SNI warnings
Switch to new Xenial environment, should fix some Python SNI warnings

