version: 2
jobs:
  build:
    environment:
      USER_NAME: rossta
      USER_EMAIL: ross@rossta.net
    docker:
      - image: circleci/ruby:2.5-node-browsers

    steps:
      - checkout

      - restore_cache:
          keys:
            - gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
            - gem-cache-{{ .Branch }}
            - gem-cache

      - run: bundle install --path vendor/bundle

      - save_cache:
          key: gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
          paths:
            - /vendor/bundle

      - restore_cache:
          keys:
            - yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
            - yarn-cache-{{ .Branch }}
            - yarn-cache

      - run: yarn install

      - save_cache:
          key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
          paths:
            - node_modules

      - run: git config --global -l # debug
      - run: git config --global user.email circleci@circleci
      - run: git config --global user.name CircleCI
      - run: bin/rake deploy

workflows:
  version: 2
  deploy-site:
    jobs:
      - build:
          filters:
            branches:
              only: develop

version: 2
jobs:
  build:
    environment:
      USER_NAME: rossta
      USER_EMAIL: ross@rossta.net
    docker:
      - image: circleci/ruby:2.5-node-browsers

    steps:
      - checkout

      - run: ruby --version
      - run: node --version

      - restore_cache:
          keys:
            - gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
            - gem-cache-{{ .Branch }}
            - gem-cache

      - run: bundle install --path vendor/bundle

      - save_cache:
          key: gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
          paths:
            - /vendor/bundle

      - restore_cache:
          keys:
            - yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
            - yarn-cache-{{ .Branch }}
            - yarn-cache

      - run: yarn install

      - save_cache:
          key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
          paths:
            - node_modules

      - run: git config --global -l # debug
      - run: git config --global user.email circleci@circleci
      - run: git config --global user.name CircleCI
      - run: bin/rake deploy

workflows:
  version: 2
  deploy-site:
    jobs:
      - build:
          filters:
            branches:
              only: develop

Check ruby and node versions on circle
Check ruby and node versions on circle
