Skip to content

Commit

Permalink
Add storybook deploy + format
Browse files Browse the repository at this point in the history
  • Loading branch information
JonahPlusPlus committed Nov 13, 2024
1 parent 65e69f3 commit 851e9a2
Show file tree
Hide file tree
Showing 5 changed files with 3,678 additions and 1,897 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ runs:
uses: pnpm/[email protected]
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
node-version: "20"
cache: "pnpm"
- name: Print versions
shell: bash
run: node --version && pnpm --version
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and Publish Storybook to GitHub Pages
on:
push:
branches:
- pages
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- uses: bitovi/[email protected]
with:
install_command: pnpm install
build_command: pnpm build-storybook
path: storybook-static
checkout: false
6 changes: 5 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
}
const config: StorybookConfig = {
stories: ["../src/index.mdx", "../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
stories: [
"../src/index.mdx",
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)",
],
addons: [
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@chromatic-com/storybook"),
Expand Down
Loading

0 comments on commit 851e9a2

Please sign in to comment.