Skip to content

Commit

Permalink
Chore: Add Storybook and Github Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
swgvenghy committed Jul 1, 2024
1 parent bc1170e commit b309231
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Storybook CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Build Storybook
run: npm run build-storybook

- name: Deploy Storybook to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "build-storybook -o storybook-static"
},
"eslintConfig": {
"extends": [
Expand Down

0 comments on commit b309231

Please sign in to comment.