Skip to content

major: v2 #2

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
53 changes: 53 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Quality checks

on:
push:
branches:
- main
- feature/**
- v2
pull_request:
branches:
- main

jobs:
quality_checks:
name: Quality checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/dist/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install
run: npm ci

- name: Security Audit Checks
run: npm run audit

- name: Static testing
run: npm run lint

- name: Build Website
run: npm run build

- name: Build Storybook
run: npm run build-storybook
21 changes: 19 additions & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { StorybookConfig } from '@storybook/react-vite';
import { mergeConfig } from 'vite';
import remarkGfm from 'remark-gfm';
import path from 'path';

const config: StorybookConfig = {
stories: [
Expand All @@ -10,7 +12,17 @@ const config: StorybookConfig = {
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-interactions',
'@storybook/addon-essentials'
'@storybook/addon-essentials',
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm]
}
}
}
}
],
framework: {
name: '@storybook/react-vite',
Expand All @@ -27,7 +39,12 @@ const config: StorybookConfig = {
},
async viteFinal(baseConfig, { configType }) {
return mergeConfig(baseConfig, {
...(configType === 'PRODUCTION' ? { base: '/storybook/' } : {})
...(configType === 'PRODUCTION' ? { base: '/storybook/' } : {}),
resolve: {
alias: {
'@shared': path.resolve(__dirname, '../src', 'shared')
}
}
});
}
};
Expand Down
7 changes: 6 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ const preview: Preview = {
code: Code
}
},
storySort: ['Introduction', 'Lessons', 'Recipes'],
storySort: [
'Introduction',
'Lessons',
['🥉 Bronze', '🥈 Silver', '🥇 Gold'],
'Recipes'
],
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
4 changes: 4 additions & 0 deletions .storybook/styles/docs.styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@
.sbdocs-content h3 {
font-size: 1.75rem;
}

.sbdocs-content ol {
list-style: decimal;
}
Loading