
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build-job:
    docker:
      # specify the version you desire here
      - image: circleci/node:8.9.4
        environment:
        - NODE_ENV: development
    working_directory: ~/repo
    steps:
      - checkout

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      # run tests!
      - run: yarn test 
  deploy-job:
    docker:
      # specify the version you desire here
      - image: circleci/node:8.9.4
        environment:
        - NODE_ENV: development
    working_directory: ~/repo

    steps:
      - checkout
      - run: yarn install
      - run: yarn deploy:remove-inactive
      - run: yarn deploy

workflows:
  version: 2
  build-deploy:
    jobs:
      - build-job
      - deploy-job:
          requires:
            - build-job
          filters:
            branches:
              only: next


# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build-job:
    docker:
      # specify the version you desire here
      - image: circleci/node:8.9.4
        environment:
        - NODE_ENV: development
    working_directory: ~/repo
    steps:
      - checkout

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      # run tests!
      - run: yarn test 

workflows:
  version: 2
  build-deploy:
    jobs:
      - build-job

Remove deployment job in Circle
Remove deployment job in Circle
