Skip to content

Commit

Permalink
Create snap-components homepage using github pages (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoAC authored Nov 17, 2024
1 parent e0231d6 commit 18c1a2b
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy Storybook

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install dependencies
run: yarn install

- name: Build Storybook
run: yarn build-storybook

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"deploy-storybook": "gh-pages -d storybook-static",
"prepare": "yarn build"
},
"dependencies": {
Expand All @@ -39,6 +40,7 @@
"@storybook/react-vite": "8.4.4",
"@storybook/test": "8.4.4",
"@types/chroma-js": "2.4.4",
"@types/gh-pages": "^6",
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
Expand All @@ -49,6 +51,7 @@
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-storybook": "^0.11.0",
"gh-pages": "6.2.0",
"globals": "^15.12.0",
"storybook": "8.4.4",
"styled-components": "6.1.13",
Expand Down
Loading

0 comments on commit 18c1a2b

Please sign in to comment.