Skip to content
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

docs: build storybook in addition to yarn build with Vercel #817

Merged
merged 4 commits into from
Jun 22, 2023
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
52 changes: 0 additions & 52 deletions .github/workflows/build.yaml

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'CodeQL'
name: CodeQL

on:
push:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Storybook

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v2.3.1

- name: 🚀 Merge main -> storybook
uses: devmasx/merge-branch@1.4.0
with:
type: now
from_branch: main
target_branch: storybook
github_token: ${{ github.token }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cypress/screenshots
cypress/videos
lib
node_modules
storybook-static
.DS_Store
npm-debug.log*
tsconfig.tsbuildinfo
Expand Down
Binary file added .storybook/inter.woff2
Binary file not shown.
6 changes: 5 additions & 1 deletion .storybook/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
@layer base {
@font-face {
font-family: 'Inter';
src: url(/public/inter.woff2) format('woff2');
src: url(inter.woff2) format('woff2');
font-weight: 100 200 300 400 500 600 700 800 900;
font-display: swap;
}

html {
font-family: 'Inter', sans-serif;
}
}
9 changes: 9 additions & 0 deletions app/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Link from 'next/link';
import type { FC } from 'react';
import { BsGithub } from 'react-icons/bs';
import { SiStorybook } from 'react-icons/si';
import { Badge, DarkThemeToggle, Tooltip } from '~/src';
import pkg from './../../package.json' assert { type: 'json' };

Expand Down Expand Up @@ -57,6 +58,14 @@ export const NavbarIcons: FC = () => {
const version = pkg?.version ?? 'latest';
return (
<div className="flex items-center gap-1">
<a
href="https://flowbite-react-git-storybook-themesberg.vercel.app"
className="hidden rounded-lg p-2.5 text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-gray-700 lg:block"
>
<Tooltip animation={false} content="View Storybook">
<SiStorybook aria-hidden className="h-5 w-5" />
</Tooltip>
</a>
<a
href="https://github.com/themesberg/flowbite-react"
className="hidden rounded-lg p-2.5 text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-gray-700 lg:block"
Expand Down