version: 2 jobs: build: docker: - image: circleci/node:dubnium-browsers working_directory: ~/repo steps: - checkout - restore_cache: keys: - dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }} # fallback to using the latest cache if no exact match is found - dependencies- - run: yarn global add node-gyp && yarn install - run: yarn global add serve - run: yarn run build - run: yarn run test # - run: yarn run serve - save_cache: paths: - node_modules key: dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }} netlifly-deploy: docker: - image: circleci/node:dubnium-browsers working_directory: ~/repo steps: - run: name: Deploy app command: sudo npm install netlify-cli -g && netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFLY_DEVOPSFINAL_TOKEN --prod workflows: version: 2 build-deploy: jobs: - build - netlifly-deploy: requires: - build