Skip to content

ci/storybook-github-pages #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/deploy-github-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Workflow
name: Storybook to GitHub Pages

on:
push:
branches:
- "main"

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
name: Deploy Storybook
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.13.1
- name: Push to GitHub Pages
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
with:
checkout: false
path: apps/storybook/storybook-static
9 changes: 9 additions & 0 deletions apps/storybook/.storybook/froglet-theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { create } from "@storybook/theming";

export default create({
base: "light",
brandTitle: "Froglet UI",
brandUrl: "https://froglet.io",
brandImage: "/froglet.png",
brandTarget: "_self",
});
2 changes: 0 additions & 2 deletions apps/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ function getAbsolutePath(value: string): any {
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
getAbsolutePath("@storybook/addon-onboarding"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@chromatic-com/storybook"),
getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
Expand Down
6 changes: 6 additions & 0 deletions apps/storybook/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from "@storybook/manager-api";
import froglet from "./froglet-theme.ts";

addons.setConfig({
theme: froglet,
});
1 change: 0 additions & 1 deletion apps/storybook/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"react-dom": "^19.0.0"
},
"devDependencies": {
"@chromatic-com/storybook": "^3.2.4",
"@eslint/js": "^9.19.0",
"@storybook/addon-essentials": "^8.5.3",
"@storybook/addon-interactions": "^8.5.3",
"@storybook/addon-onboarding": "^8.5.3",
"@storybook/blocks": "^8.5.3",
"@storybook/manager-api": "^8.5.6",
"@storybook/react": "^8.5.3",
"@storybook/react-vite": "^8.5.3",
"@storybook/test": "^8.5.3",
"@storybook/theming": "^8.5.6",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
Expand Down
Binary file added apps/storybook/public/froglet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion apps/storybook/public/vite.svg

This file was deleted.

Loading