machine:
  node:
    version: 4.4.7
  environment:
    NODE_ENV: test

dependencies:
  # Gulp must be installed in the global environment.
  pre:
    - npm install -g gulp-cli
  post:
    - npm install -g aws-cli

test:
  post:
    # For Precog.
    - cp -R build data index.html $CIRCLE_ARTIFACTS

# For hosting on mapzen.com. Only deploy if tests pass. Compiled files are
# rebuilt for a production environment.
deployment:
  production:
    branch: master
    commands:
      - NODE_ENV=production gulp build
      - cp -R build data index.html $CIRCLE_ARTIFACTS
      - aws s3 sync $CIRCLE_ARTIFACTS $AWS_DESTINATION --delete
      - ./deploy/invalidate_cloudfront.sh

machine:
  node:
    version: 4.4.7
  environment:
    NODE_ENV: test

dependencies:
  # Gulp must be installed in the global environment.
  pre:
    - npm install -g gulp-cli
  post:
    - npm install -g aws-cli

test:
  post:
    # For Precog.
    - NODE_ENV=production gulp build
    - cp -R build data index.html $CIRCLE_ARTIFACTS

# For hosting on mapzen.com. Only deploy if tests pass. Compiled files are
# rebuilt for a production environment.
deployment:
  production:
    branch: master
    commands:
      - aws s3 sync $CIRCLE_ARTIFACTS $AWS_DESTINATION --delete
      - ./deploy/invalidate_cloudfront.sh

Build production files for Precog
Build production files for Precog
