version: 2
jobs:
  build:
    working_directory: ~/iypm
    docker:
      - image: minn/node-awscli:latest
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ checksum "package.json" }}
      - run: yarn install
      - save_cache:
          key: deps-{{ checksum "package.json" }}
          paths:
            - ~/.cache
      - run: yarn build
      - run: yarn test
      - deploy:
          name: Deploy release or release candidate
          command: |
            if git describe | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+-rc\.[0-9]\+$";
            then
              echo "Deploying release candidate..."
              $(yarn bin)/now -t ${ZEIT_TOKEN} switch ${ZEIT_TEAM}
              $(yarn bin)/now -t ${ZEIT_TOKEN}
            elif git describe | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
            then
              echo "Deploying release onto production..."
              aws s3 sync build s3://${S3_BUCKET_PROD} --delete --acl public-read
              aws configure set preview.cloudfront true
              aws cloudfront create-invalidation --distribution-id ${CF_DIST_ID} --paths "/*"
            else
              echo "Skipping deploy..."
            fi

deployment:
  fake_deploy_for_cci2:
    tag: /.*/
    commands:
      - echo "make tags run in 2.0"

version: 2
jobs:
  build:
    working_directory: ~/iypm
    docker:
      - image: minn/node-awscli:latest
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ checksum "package.json" }}
      - run: yarn install
      - save_cache:
          key: deps-{{ checksum "package.json" }}
          paths:
            - ~/.cache
      - run: yarn build
      - run: yarn test
      - deploy:
          name: Deploy release or release candidate
          command: |
            if git describe | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+-rc\.[0-9]\+$";
            then
              echo "Deploying release candidate..."
              $(yarn bin)/now -t ${ZEIT_TOKEN} switch ${ZEIT_TEAM}
              $(yarn bin)/now -p -t ${ZEIT_TOKEN}
            elif git describe | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
            then
              echo "Deploying release onto production..."
              aws s3 sync build s3://${S3_BUCKET_PROD} --delete --acl public-read
              aws configure set preview.cloudfront true
              aws cloudfront create-invalidation --distribution-id ${CF_DIST_ID} --paths "/*"
            else
              echo "Skipping deploy..."
            fi

deployment:
  fake_deploy_for_cci2:
    tag: /.*/
    commands:
      - echo "make tags run in 2.0"

Update now command to deploy publically
Update now command to deploy publically
