machine:
  node:
    version: 4.1.0
  ruby:
    version: 2.1.2
checkout:
  post:
    # Make sure that the git repo that circleCI clones is not cloned shallow
    # (by default, it only clones the last 25 commits - aka shallow)
    # copy/pasted from circleCI support)
    - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
dependencies:
  pre:
    - ./scripts/site/prepare.sh
  cache_directories:
    - "~/ionic-site" # cache ionic-site
  post:
    - bower install
test:
  override:
    - ./scripts/circle/test.sh --index=$CIRCLE_NODE_INDEX --total=$CIRCLE_NODE_TOTAL
deployment:
 tasks:
   branch: master
   commands:
     - ./scripts/circle/deploy.sh --sha1=$CIRCLE_SHA1 --index=$CIRCLE_NODE_INDEX --build-number=$CIRCLE_BUILD_NUM
