Skip to content

Commit 6ea59ee

Browse files
build & deploy storybook to github pages
1 parent 212127c commit 6ea59ee

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.github/workflows/storybook.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: storybook
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
storybook:
10+
name: 🎨 Storybook Build & Deploy to GH Pages
11+
permissions:
12+
pages: write # to deploy to Pages
13+
id-token: write # to verify the deployment originates from an appropriate source
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: lts/Iron
24+
25+
- name: Cache node_modules
26+
id: cache-node-modules
27+
uses: actions/cache@v3
28+
with:
29+
path: node_modules
30+
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
31+
32+
- name: Install
33+
run: npm install
34+
35+
- name: Build Storybook
36+
run: npm run build-storybook
37+
38+
- name: Upload Storybook
39+
uses: actions/upload-pages-artifact@v2
40+
with:
41+
path: storybook-static
42+
43+
- name: Deploy to GitHub Pages
44+
uses: actions/deploy-pages@v2
45+
with:
46+
token: ${{ github.token }}

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ yarn-error.log*
4949
# EdgeDB query client
5050
src/edgeql-js
5151

52-
*storybook.log
52+
# Storybook
53+
*storybook.log
54+
/storybook-static

0 commit comments

Comments
 (0)