machine:
  node:
    version: 4.3.2

dependencies:
  pre:
    - sudo apt-get update && sudo apt-get install jq
    - pip install awscli

test:
  override:
    - echo 'no tests!'

deployment:
  production:
    branch: production
    commands:
      - ./bin/deploy prod
      - aws s3 sync static/ s3://callsforchange.com/
  staging:
    branch: master
    commands:
      - ./bin/deploy dev
      - aws s3 sync static/ s3://www.52calls-52weeks.com/

machine:
  node:
    version: 4.3.2

dependencies:
  pre:
    - sudo apt-get update && sudo apt-get install jq
    - pip install awscli
    - aws configure set preview.cloudfront true

test:
  override:
    - echo 'no tests!'

deployment:
  production:
    branch: production
    commands:
      - ./bin/deploy prod
      - aws s3 sync static/ s3://callsforchange.com/
      - aws --region us-east-1 cloudfront create-invalidation --distribution-id E3VA3C4R5I28R2 --paths '/*'
  staging:
    branch: master
    commands:
      - ./bin/deploy dev
      - aws s3 sync static/ s3://www.52calls-52weeks.com/
      - aws --region us-west-2 cloudfront create-invalidation --distribution-id E1YG4R2UNDSCRT --paths '/*'

Add invalidation post-deploy for static assets
Add invalidation post-deploy for static assets
