Skip to content

Commit

Permalink
fix: use cross-end for storybook build
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeb committed Mar 15, 2024
1 parent a42f8da commit 1228f64
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ 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
Expand All @@ -30,3 +27,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: 2af88e64d1ab
exitOnceUploaded: true
buildScriptName: 'storybook:build'
7 changes: 4 additions & 3 deletions .github/workflows/toolkit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ 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
Expand All @@ -28,3 +28,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: 2af88e64d1ab
exitOnceUploaded: true
buildScriptName: 'storybook:build'
28 changes: 28 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"build": "lerna run build && npm run style",
"postversion": "rimraf package-lock.json && npm i --force --ignore-scripts && git add package-lock.json && git commit --amend --no-edit",
"style": "node ./scripts/style.js",
"storybook": "set NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 9009 -s storybook-public",
"storybook:build": "set NODE_OPTIONS=--openssl-legacy-provider && build-storybook -s storybook-public -c .storybook -o storybook-static && node ./scripts/inject-version.js",
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 9009 -s storybook-public",
"storybook:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider build-storybook -s storybook-public -c .storybook -o storybook-static && node ./scripts/inject-version.js",
"test": "jest",
"cover": "jest --no-cache --config ./jest.config.ts --coverage",
"check": "npm run check:formatting && npm run check:quality",
Expand Down Expand Up @@ -61,6 +61,7 @@
"@typescript-eslint/parser": "4.6.1",
"babel-loader": "8.1.0",
"bootstrap": "4.3.1",
"cross-env": "7.0.3",
"css-loader": "5.0.1",
"eslint": "7.12.1",
"eslint-config-airbnb-typescript": "12.0.0",
Expand Down

0 comments on commit 1228f64

Please sign in to comment.