From dac4bc9c31239413d071ef5c73f77f626ec9783c Mon Sep 17 00:00:00 2001 From: "J. Ryan Conklin" Date: Mon, 17 Feb 2025 15:29:08 -0800 Subject: [PATCH 1/3] ci: rename directory and files to uppercase --- packages/froglet-ui/src/{button/button.tsx => Button/Button.tsx} | 0 packages/froglet-ui/src/{button => Button}/button.css | 0 packages/froglet-ui/src/{link => Link}/Link.tsx | 0 packages/froglet-ui/src/{link => Link}/link.css | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename packages/froglet-ui/src/{button/button.tsx => Button/Button.tsx} (100%) rename packages/froglet-ui/src/{button => Button}/button.css (100%) rename packages/froglet-ui/src/{link => Link}/Link.tsx (100%) rename packages/froglet-ui/src/{link => Link}/link.css (100%) diff --git a/packages/froglet-ui/src/button/button.tsx b/packages/froglet-ui/src/Button/Button.tsx similarity index 100% rename from packages/froglet-ui/src/button/button.tsx rename to packages/froglet-ui/src/Button/Button.tsx diff --git a/packages/froglet-ui/src/button/button.css b/packages/froglet-ui/src/Button/button.css similarity index 100% rename from packages/froglet-ui/src/button/button.css rename to packages/froglet-ui/src/Button/button.css diff --git a/packages/froglet-ui/src/link/Link.tsx b/packages/froglet-ui/src/Link/Link.tsx similarity index 100% rename from packages/froglet-ui/src/link/Link.tsx rename to packages/froglet-ui/src/Link/Link.tsx diff --git a/packages/froglet-ui/src/link/link.css b/packages/froglet-ui/src/Link/link.css similarity index 100% rename from packages/froglet-ui/src/link/link.css rename to packages/froglet-ui/src/Link/link.css From 6faf52913ed440d43119f2f929bb0af2fc10b831 Mon Sep 17 00:00:00 2001 From: "J. Ryan Conklin" Date: Mon, 17 Feb 2025 15:55:42 -0800 Subject: [PATCH 2/3] ci: add storybook static to lint ignore --- .github/workflows/deploy-github-pages.yaml | 4 +--- apps/storybook/eslint.config.js | 2 +- apps/storybook/src/stories/Button.stories.tsx | 2 +- apps/storybook/src/stories/Link.stories.tsx | 2 +- packages/froglet-ui/package.json | 4 ++-- turbo.json | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-github-pages.yaml b/.github/workflows/deploy-github-pages.yaml index ac665e0..4e039f8 100644 --- a/.github/workflows/deploy-github-pages.yaml +++ b/.github/workflows/deploy-github-pages.yaml @@ -2,9 +2,7 @@ name: Storybook to GitHub Pages on: - push: - branches: - - "main" + pull_request permissions: contents: read diff --git a/apps/storybook/eslint.config.js b/apps/storybook/eslint.config.js index 092408a..ddb795e 100644 --- a/apps/storybook/eslint.config.js +++ b/apps/storybook/eslint.config.js @@ -5,7 +5,7 @@ import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint' export default tseslint.config( - { ignores: ['dist'] }, + { ignores: ['dist', 'storybook-static'] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ['**/*.{ts,tsx}'], diff --git a/apps/storybook/src/stories/Button.stories.tsx b/apps/storybook/src/stories/Button.stories.tsx index 4ed0f24..4a16151 100644 --- a/apps/storybook/src/stories/Button.stories.tsx +++ b/apps/storybook/src/stories/Button.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Button } from "@froglet/ui/button"; +import { Button } from "@froglet/ui/Button"; const meta = { title: "Button", diff --git a/apps/storybook/src/stories/Link.stories.tsx b/apps/storybook/src/stories/Link.stories.tsx index 52a6232..660858b 100644 --- a/apps/storybook/src/stories/Link.stories.tsx +++ b/apps/storybook/src/stories/Link.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Link } from "@froglet/ui/link"; +import { Link } from "@froglet/ui/Link"; const meta = { title: "Link", diff --git a/packages/froglet-ui/package.json b/packages/froglet-ui/package.json index edaa084..cc0e0d3 100644 --- a/packages/froglet-ui/package.json +++ b/packages/froglet-ui/package.json @@ -2,8 +2,8 @@ "name": "@froglet/ui", "version": "0.0.0", "exports": { - "./button": "./src/button/Button.tsx", - "./link": "./src/link/Link.tsx" + "./Button": "./src/Button/Button.tsx", + "./Link": "./src/Link/Link.tsx" }, "scripts": { "lint": "eslint . --max-warnings 0", diff --git a/turbo.json b/turbo.json index 73a6948..669627a 100644 --- a/turbo.json +++ b/turbo.json @@ -15,7 +15,7 @@ "build-storybook": { "dependsOn": ["^build-storybook"], "inputs": ["$TURBO_DEFAULT$", ".env*"], - "outputs": ["apps/storybook/dist/**"] + "outputs": ["apps/storybook/storybook-static/**"] }, "lint": { "dependsOn": ["^lint"] From b5d6218ce076533bcdb5fd4b5d02399c0f6c1e1c Mon Sep 17 00:00:00 2001 From: "J. Ryan Conklin" Date: Mon, 17 Feb 2025 16:00:15 -0800 Subject: [PATCH 3/3] ci: move workflow back to on pr --- .github/workflows/deploy-github-pages.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-github-pages.yaml b/.github/workflows/deploy-github-pages.yaml index 4e039f8..ac665e0 100644 --- a/.github/workflows/deploy-github-pages.yaml +++ b/.github/workflows/deploy-github-pages.yaml @@ -2,7 +2,9 @@ name: Storybook to GitHub Pages on: - pull_request + push: + branches: + - "main" permissions: contents: read