version: 2
jobs:
   build:
     docker:
       - image: circleci/node:latest
     steps:
       - checkout
       - run: node --version
       - run: git status
       - run: yarn install
       - run: git status
       - deploy:
          name: Maybe Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              echo "deploy"
            fi

version: 2
jobs:
   build:
     docker:
       - image: circleci/node:latest
     steps:
       - checkout
       - run: node --version
       - run: git status
       - run: yarn install --frozen-lockfile
       - run: git status
       - deploy:
          name: Maybe Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              echo "deploy"
            fi

Use --frozen-lockfile as it is ci context
Use --frozen-lockfile as it is ci context
