2019-03-18 10:21:58 +00:00
|
|
|
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" }}
|
|
|
|
|
2019-03-26 14:49:11 +00:00
|
|
|
# - run: yarn test
|
2019-03-18 10:21:58 +00:00
|
|
|
- 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
|
2019-03-19 11:06:37 +00:00
|
|
|
command: sudo npm install -g gh-pages@2.0.1 && git config user.email "julien@status.im" && git config user.name "jeluard"
|
2019-03-18 10:21:58 +00:00
|
|
|
|
|
|
|
- add_ssh_keys:
|
|
|
|
fingerprints:
|
2019-03-19 11:06:37 +00:00
|
|
|
- "88:41:2a:73:d4:c5:f2:4a:35:89:7e:0a:56:83:45:1e"
|
2019-03-18 10:21:58 +00:00
|
|
|
- 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
|