Skip to content

Commit

Permalink
ci(storybook): deploy storybook when new lib version is released
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbien committed Mar 15, 2020
1 parent a90dadb commit a6f93c0
Show file tree
Hide file tree
Showing 5 changed files with 3,178 additions and 96 deletions.
24 changes: 21 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
at: ~/repo
- run:
name: 'Tests'
command: npm run test
command: npm run test:ci
build-library:
docker:
- image: 'circleci/node:latest'
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
root: ~/repo
paths:
- docs
deploy:
deploy-library:
docker:
- image: 'circleci/node:latest'
working_directory: ~/repo
Expand All @@ -73,6 +73,17 @@ jobs:
- run:
name: 'Deploy via Semantic Release'
command: npm run semantic-release || true
deploy-storybook:
docker:
- image: 'circleci/node:latest'
working_directory: ~/repo
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: 'Deploy Storybook'
command: firebase deploy --token=$FIREBASE_TOKEN
workflows:
version: 2
build-and-deploy:
Expand All @@ -87,8 +98,15 @@ workflows:
- build-storybook:
requires:
- install
- deploy:
- deploy-library:
requires:
- test
- build-library
- build-storybook
- deploy-storybook:
requires:
- deploy-library
filters:
branches:
only:
- beta
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "react95-storybook"
}
}
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "docs",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Loading

0 comments on commit a6f93c0

Please sign in to comment.