From ab6be3cdadc14c1881b3ae9def7386ede2cac6de Mon Sep 17 00:00:00 2001 From: sercan Date: Mon, 18 Mar 2019 11:21:58 +0100 Subject: [PATCH] #5 circleci ci & cd setup --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..a184b3d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +version: 2 +jobs: + components-build: + docker: + - image: circleci/node:8 + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: yarn install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + + - run: yarn test + - run: yarn build-storybook + - persist_to_workspace: + root: . + paths: storybook-static + + components-deploy: + docker: + - image: circleci/node:8 + steps: + - checkout + - attach_workspace: + at: . + - run: + name: Install and configure dependencies + command: sudo npm install -g gh-pages@2.0.1 && git config user.email "ozdemirsercan27@gmail.com" && git config user.name "rsercano" + + - add_ssh_keys: + fingerprints: + - "5f:76:ee:7a:54:c7:83:b6:89:cc:ff:cc:5f:77:eb:d2" + - run: + name: Deploy docs to gh-pages branch + command: gh-pages --dotfiles --message "Auto generated commit" --dist storybook-static +workflows: + version: 2 + build: + jobs: + - components-build + - components-deploy: + requires: + - components-build diff --git a/package.json b/package.json index 0eff29d..65e7dda 100644 --- a/package.json +++ b/package.json @@ -38,5 +38,6 @@ "not dead", "not ie <= 11", "not op_mini all" - ] + ], + "homepage": "https://status-im.github.io/status-components/" }