Skip to content

Commit 2bca73a

Browse files
Create storybook.yml
1 parent f13e6d2 commit 2bca73a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/storybook.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
paths: [".storybook/**", "src/**"] # Trigger the action only when files change in the folders defined here
5+
jobs:
6+
build-and-deploy:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout 🛎️
10+
uses: actions/[email protected]
11+
with:
12+
persist-credentials: false
13+
- name: Install and Build 🔧
14+
run: | # Install npm packages and build the Storybook files
15+
npm install
16+
npm run build:storybook
17+
- name: Deploy 🚀
18+
uses: JamesIves/[email protected]
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
BRANCH: master # The branch the action should deploy to.
22+
FOLDER: storybook-static # The folder that the build-storybook script generates files.
23+
CLEAN: true # Automatically remove deleted files from the deploy branch
24+
TARGET_FOLDER: static # The folder that we serve our Storybook files from

0 commit comments

Comments
 (0)