From d56c949f1cba17cc70db29c5637c2767b3217ee1 Mon Sep 17 00:00:00 2001 From: Julien Dudek Date: Wed, 6 Jan 2021 02:11:15 +0100 Subject: [PATCH] :green_heart: add server deploy --- .circleci/config.yml | 22 +++++++++++++++++++++- .gitignore | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f0cc1c0..bffa0db 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,6 +71,23 @@ jobs: - node_modules key: v1-dependencies-{{ checksum "package.json" }} + deploy: + docker: + - image: circleci/node:dubnium-browsers + working_directory: ~/repo + steps: + - checkout + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + name: Deploy app + command: npx netlify-cli deploy --auth $NETLIFY_AUTH_TOKEN --site $NETLIFY_SITE_ID --dir /tmp/server --prod + workflows: version: 2 build-test-and-deploy: @@ -78,4 +95,7 @@ workflows: - install - build: requires: - - install \ No newline at end of file + - install + - deploy: + requires: + - build \ No newline at end of file diff --git a/.gitignore b/.gitignore index 863c1df..2512fa3 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ yarn-error.log* # Coverage Reports coverage + +# Local Netlify folder +.netlify \ No newline at end of file