Conditional setup_remote_docker command



Im using the setup_remote_docker command to build my production containers, only this command only needs to be executed when im on a certain branch. So could you tell me how to make this call conditional?

- steps:
      - setup_remote_docker
      - run:
          name: Maybe deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "feature/circleci-2" ]; then
              bin/deploy staging
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              bin/deploy production

This will shave off an additional 1,5 minute for the branches that dont need to be pushed to production



Currently, the only way to conditionally start the Docker engine is to trigger a new job with those if statements and deploy there.