Skip to content

Commit

Permalink
🚀 deploy: deploy on github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
futjesus committed Oct 21, 2024
1 parent 8d3f9b4 commit 3099890
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Storybook to GitHub Pages

on:
push:
branches:
- main

permissions:
packages: write
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Install dependencies
run: npm ci

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

- name: Deploy Storybook to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"scripts": {
"build": "rimraf ./dist && tsc --p ./tsconfig.build.json && vite build && cp ./package.json ./dist/package.json",
"build:storybook": "storybook build",
"build:storybook": "storybook build -o storybook-static",
"check:prettier": "prettier lib --check --config ./.prettierrc",
"check:types": "tsc -p tsconfig.json",
"deps:update": "npx npm-check-updates --interactive --format group",
Expand Down Expand Up @@ -79,4 +79,4 @@
"vite-plugin-dts": "^4.2.4",
"vite-plugin-lib-inject-css": "^2.1.1"
}
}
}

0 comments on commit 3099890

Please sign in to comment.