From dcfaf6b2a36704e2bc8988e48d22e7ec5a85dfa9 Mon Sep 17 00:00:00 2001 From: tchawou-daniel Date: Sat, 16 Jan 2021 20:20:53 +0100 Subject: [PATCH] :construction_worker: add the config of netlify --- .circleci/config.yml | 16 +++++++++++++++- .gitignore | 3 +++ netlify.toml | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 netlify.toml diff --git a/.circleci/config.yml b/.circleci/config.yml index d8ced69..998c596 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,17 @@ jobs: root: /tmp paths: - dist + front-deploy: + docker: + - image: circleci/node:dubnium-browsers + working_directory: ~/dist + steps: + - attach_workspace: + at: /tmp + - run: + name: Deploy app + command: | + npx netlify-cli deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_ACCESS_TOKEN --dir /tmp/dist --prod workflows: version: 2.1 build-deploy_frontend: @@ -41,4 +52,7 @@ workflows: - install-dependencies - build: requires: - - install-dependencies \ No newline at end of file + - install-dependencies + - front-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 diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..e7373dc --- /dev/null +++ b/netlify.toml @@ -0,0 +1,21 @@ +# example netlify.toml +[build] + command = "yarn run build" + functions = "functions" + publish = "." + + ## Uncomment to use this redirect for Single Page Applications like create-react-app. + ## Not needed for static site generators. + #[[redirects]] + # from = "/*" + # to = "/index.html" + # status = 200 + + ## (optional) Settings for Netlify Dev + ## https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection + #[dev] + # command = "yarn start" # Command to start your dev server + # port = 3000 # Port that the dev server will be listening on + # publish = "dist" # Folder with the static content for _redirect file + + ## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/