Skip to content

Commit c64767e

Browse files
committed
fix(chromatic): fix chromatic deploy CI
1 parent 4e421b4 commit c64767e

File tree

5 files changed

+128
-486
lines changed

5 files changed

+128
-486
lines changed

.github/workflows/chromatic.yaml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- v*
99

10+
env:
11+
node_version: '13.7.0'
12+
1013
jobs:
1114
deploy:
1215
# Run on push version tag OR on PR with the "need: review-design" label
@@ -16,30 +19,18 @@ jobs:
1619
- name: "Checkout repository"
1720
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f #v2.3.4
1821
with:
19-
fetch-depth: 0 # Required to retrieve git history
22+
fetch-depth: 0 # retrieve all the repo history (required by chromatic)
2023

2124
- name: "Setup node env"
2225
uses: actions/setup-node@c6fd00ceb9747fb23ffdf72987450a2664414867 #v2.1.2
2326
with:
24-
node-version: '13.7.0'
25-
26-
- name: "Get yarn cache directory path"
27-
id: yarn-cache-dir-path
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
29-
30-
- name: "Dependency cache"
31-
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 #v2.1.4
32-
with:
33-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-yarn-
27+
node-version: ${{ env.node_version }}
3728

3829
- name: "Install dependencies"
39-
run: yarn install --frozen-lockfile
30+
run: yarn install --immutable
4031

4132
- name: "Deploy chromatic"
42-
uses: chromaui/action@5c36690a7d85fc6345aa786cc5b3d3d9742af4fb #v1
33+
uses: chromaui/action@3f82bf5d065290658af8add6dce946809ee0f923 #v6.1.0
4334
with:
4435
token: ${{ secrets.GITHUB_TOKEN }}
4536
projectToken: ${{ secrets.CHROMATIC_TOKEN }}

.github/workflows/github-actions-validator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: lumapps/github-actions-validator@0.0.2
11+
- uses: lumapps/github-actions-validator@v1.0.5

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"scripts": {
7171
"build": "lerna run --stream build",
7272
"build:site": "yarn workspace lumx-site-demo clean && yarn workspace lumx-site-demo build",
73-
"build:storybook": "yarn workspace @lumx/react build-storybook -s ../site-demo/static",
73+
"build:storybook": "yarn workspace @lumx/react build:storybook",
7474
"chromatic": "npx chromatic -b build:storybook",
7575
"clean": "rm -rf packages/*/dist && lerna clean --yes && lerna run --stream clean",
7676
"clean:git-hooks": "yarn husky uninstall",
@@ -82,7 +82,7 @@
8282
"lint:code": "eslint packages/**/*.{ts,tsx,js}",
8383
"prepare": "lerna run --stream prepare",
8484
"preversion": "git symbolic-ref --short -q HEAD | egrep -q '^master$' && echo 'ERROR: You can not release from the master branch.' && exit 1 || true",
85-
"version": "yarn && yarn version-changelog CHANGELOG.md && git add CHANGELOG.md",
85+
"version": "yarn --immutable && yarn version-changelog CHANGELOG.md && git add CHANGELOG.md",
8686
"release": "yarn lerna publish --force-publish",
8787
"scaffold": "yo ./packages/yo-generators --with-tests --with-demo",
8888
"setup:git-hooks": "yarn husky uninstall && yarn husky install || exit 0",

packages/lumx-react/package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@
2828
"@babel/preset-typescript": "^7.12.7",
2929
"@rollup/plugin-commonjs": "^15.0.0",
3030
"@rollup/plugin-node-resolve": "9.0.0",
31-
"@storybook/addon-a11y": "^5.3.12",
32-
"@storybook/addon-actions": "^5.3.19",
33-
"@storybook/addon-knobs": "^5.3.12",
34-
"@storybook/addon-storysource": "^5.3.12",
35-
"@storybook/addon-viewport": "^5.3.12",
36-
"@storybook/react": "^5.3.12",
31+
"@storybook/addon-a11y": "^5.3.21",
32+
"@storybook/addon-actions": "^5.3.21",
33+
"@storybook/addon-knobs": "^5.3.21",
34+
"@storybook/addon-storysource": "^5.3.21",
35+
"@storybook/addon-viewport": "^5.3.21",
36+
"@storybook/core": "^5.3.21",
37+
"@storybook/react": "^5.3.21",
3738
"@types/body-scroll-lock": "^2.6.1",
3839
"@types/classnames": "^2.2.9",
3940
"@types/enzyme": "^3.10.5",
@@ -119,7 +120,9 @@
119120
"prepare": "install-peers || exit 0",
120121
"prepublishOnly": "yarn build",
121122
"test": "jest --config jest/index.js --coverage --notify --passWithNoTests --detectOpenHandles --runInBand",
122-
"storybook": "start-storybook -s ../site-demo/static/ -p 9000"
123+
"prepare:storybook": "mkdir -p node_modules",
124+
"storybook": "yarn prepare:storybook && start-storybook -s ../site-demo/static/ -p 9000",
125+
"build:storybook": "yarn prepare:storybook && build-storybook -s ../site-demo/static"
123126
},
124127
"sideEffects": false,
125128
"version": "2.1.5"

0 commit comments

Comments
 (0)