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

fix: use cross-end for storybook build #1129

Merged
merged 4 commits into from
Apr 10, 2024
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
13 changes: 6 additions & 7 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,27 @@ on:
branches:
- master

env:
NODE_VERSION: 16.x

jobs:
chromatic:
if: github.repository_owner == 'AxaFrance'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # 👈 Required to retrieve git history for Chromatic
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version: '*'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run storybook:build
- name: Publish to Chromatic
uses: chromaui/action@v1
uses: chromaui/action@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: 2af88e64d1ab
exitOnceUploaded: true
storybookBuildDir: storybook-static
10 changes: 6 additions & 4 deletions .github/workflows/toolkit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ jobs:
if: github.repository_owner == 'AxaFrance'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: '*'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run check
- run: npm test -- --coverage
- run: npm run storybook:build
- name: Publish to Chromatic
uses: chromaui/action@v1
uses: chromaui/action@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: 2af88e64d1ab
exitOnceUploaded: true
storybookBuildDir: storybook-static
1 change: 0 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ module.exports = {
'@storybook/addon-essentials',
'@storybook/addon-storysource',
'@storybook/addon-a11y',
'storybook-readme',
],
webpackFinal: async (config) => {
config.module.rules.push({
Expand Down
3 changes: 1 addition & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { addReadme } from 'storybook-readme';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';

import '../packages/all/dist/style/af-toolkit-core.css';
import '../packages/core/dist/assets/fonts/icons/af-icons.css';
import './storybook.css';

export const decorators = [addReadme];
export const decorators = [];

export const parameters = {
actions: { argTypesRegex: '^on.*' },
Expand Down
Loading
Loading