Skip to content

Commit 47bc524

Browse files
chore: adding github workflow to publish storybook react
1 parent 00e81a1 commit 47bc524

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Deploy Storybook
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_call:
8+
secrets:
9+
PUBLISH_STORYBOOK_TOKEN:
10+
required: true
11+
12+
jobs:
13+
build-deploy-storybook:
14+
name: Build and Deploy Storybook
15+
permissions:
16+
contents: write
17+
runs-on: ubuntu-latest
18+
environment: github-pages
19+
defaults:
20+
run:
21+
working-directory: apps/storybook-react
22+
steps:
23+
- name: Checkout and setup environment
24+
uses: MetaMask/action-checkout-and-setup@v1
25+
with:
26+
is-high-risk-environment: false
27+
cache-node-modules: true
28+
29+
- name: Install dependencies
30+
run: yarn --immutable
31+
32+
- name: Build Storybook
33+
run: yarn build-storybook
34+
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935
37+
with:
38+
personal_token: ${{ secrets.PUBLISH_STORYBOOK_TOKEN }}
39+
publish_dir: ./storybook-static
40+
destination_dir: storybook-static

0 commit comments

Comments
 (0)