Skip to content

Commit 237e1b6

Browse files
b3008claude
andcommitted
Add GitHub Actions workflow to deploy Storybook to GitHub Pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b847e32 commit 237e1b6

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy Storybook to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: yarn
29+
30+
- run: yarn install --frozen-lockfile
31+
32+
- run: npm run build-storybook
33+
34+
- uses: actions/configure-pages@v4
35+
36+
- uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: storybook-static
39+
40+
- id: deployment
41+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)