From 84b5a366cdfeec8d34ec7f790e1ba80098338044 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 17 Jan 2021 11:06:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7artifact-save?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .circleci/config.yml | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a64fb32..074cfe2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,21 +20,51 @@ jobs: paths: - node_modules key: dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }} + artifact-save: + 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: + name: Copy deployment artifacts to workspace + command: | + cp ./dist /tmp/server -r + - store_artifacts: + path: /tmp/server + - persist_to_workspace: + root: /tmp + paths: + - server + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + 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 + 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 + - artifact-save: + requires: + -build - netlifly-deploy: requires: - build + - artifact-save \ No newline at end of file