Skip to content

Commit a6f93c0

Browse files
committed
ci(storybook): deploy storybook when new lib version is released
#110
1 parent a90dadb commit a6f93c0

File tree

5 files changed

+3178
-96
lines changed

5 files changed

+3178
-96
lines changed

.circleci/config.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
at: ~/repo
3232
- run:
3333
name: 'Tests'
34-
command: npm run test
34+
command: npm run test:ci
3535
build-library:
3636
docker:
3737
- image: 'circleci/node:latest'
@@ -62,7 +62,7 @@ jobs:
6262
root: ~/repo
6363
paths:
6464
- docs
65-
deploy:
65+
deploy-library:
6666
docker:
6767
- image: 'circleci/node:latest'
6868
working_directory: ~/repo
@@ -73,6 +73,17 @@ jobs:
7373
- run:
7474
name: 'Deploy via Semantic Release'
7575
command: npm run semantic-release || true
76+
deploy-storybook:
77+
docker:
78+
- image: 'circleci/node:latest'
79+
working_directory: ~/repo
80+
steps:
81+
- checkout
82+
- attach_workspace:
83+
at: ~/repo
84+
- run:
85+
name: 'Deploy Storybook'
86+
command: firebase deploy --token=$FIREBASE_TOKEN
7687
workflows:
7788
version: 2
7889
build-and-deploy:
@@ -87,8 +98,15 @@ workflows:
8798
- build-storybook:
8899
requires:
89100
- install
90-
- deploy:
101+
- deploy-library:
91102
requires:
92103
- test
93104
- build-library
94105
- build-storybook
106+
- deploy-storybook:
107+
requires:
108+
- deploy-library
109+
filters:
110+
branches:
111+
only:
112+
- beta

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "react95-storybook"
4+
}
5+
}

firebase.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"hosting": {
3+
"public": "docs",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"rewrites": [
10+
{
11+
"source": "**",
12+
"destination": "/index.html"
13+
}
14+
]
15+
}
16+
}

0 commit comments

Comments
 (0)