From 659b1a526a00850c16c4ee3b000c671f29059c3b Mon Sep 17 00:00:00 2001 From: Chiara Date: Mon, 18 Jan 2021 19:31:36 +0100 Subject: [PATCH] :green_heart: : config file --- .circleci/config.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..301d24f --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,35 @@ +version: 2.1 + +jobs: + yarn-install-build: + docker: + - image: "circleci/node:12:18" + steps: + - checkout + - restore_cache: + key: npm-v2-dependencies-{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - run: yarn build + - save_cache: + key: npm-v2-dependencies-{{ checksum "yarn.lock" }} + paths: + - ./node_modules + server-deploy: + docker: + - image: circleci/node:dubnium-browsers + working_directory: ~/deploy-doc-server + steps: + - attach_workspace: + at: /tmp + - run: + name: Deploy app + command: sudo npm install -g --silent netlify-cli + netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN + +workflows: + node-tests: + jobs: + - yarn-install-build + - server-deploy: + requires: + - yarn-install-build