Skip to content

Commit

Permalink
12 storybook build deploy (#13)
Browse files Browse the repository at this point in the history
* edited build storybook command + github action for build and deploy

* testing action

* splitted steps

* removed on pull_request trigger

* added docs folder to .gitignore
  • Loading branch information
AAndonio authored May 16, 2024
1 parent 9feec8e commit ca2f42e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Deploy Storybook
on:
push:
branches:
- main
permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Clean install
run: npm ci
- name: Build
run: npm run build-storybook
- name: Build and deploy to storybook-static branch
uses: JamesIves/github-pages-deploy-action@v4.6.0
with:
folder: docs # The folder the action should deploy.
branch: docs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ coverage
*.sw?

*.tsbuildinfo

/docs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"build-storybook": "storybook build -o docs",
"build-publish": "vite build && npm publish --access public"
},
"devDependencies": {
Expand Down

0 comments on commit ca2f42e

Please sign in to comment.