version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8.9

    working_directory: ~/repo

    branches:
      only:
        - master

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "app/package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run:
          command: yarn install
          working_directory: app

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "app/package.json" }}

      # run tests!
      - run:
          command: yarn build
          working_directory: app

      - run: ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts
      - run: rsync -az ~/repo/build/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIRECTORY --delete

version: 2
jobs:
  build:
    docker:
      - image: node:8.9

    working_directory: ~/repo

    branches:
      only:
        - master

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "app/package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run:
          command: yarn install
          working_directory: app

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "app/package.json" }}

      # run tests!
      - run:
          command: yarn build
          working_directory: app

      - run: ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts
      - run: rsync -az ~/repo/build/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIRECTORY --delete

Use a different docker image, hopefully this one has rsync
Use a different docker image, hopefully this one has rsync
