Skip to content

Commit 05bff8b

Browse files
try
1 parent 3d1494d commit 05bff8b

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

.github/workflows/ci.yml

+25-22
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,35 @@ jobs:
100100
- name: Build
101101
run: npm run build -ws --if-present
102102

103+
build-components-json:
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: Checkout repository
107+
uses: actions/checkout@v4
108+
- name: Use Node.js 20.x
109+
uses: actions/setup-node@v4
110+
with:
111+
node-version: 22
112+
cache: "npm"
113+
- name: Install dependencies
114+
run: npm ci
115+
- name: Build storybook to generate story IDs
116+
run: npm run build:storybook
117+
working-directory: packages/react
118+
- name: Build components.json
119+
run: npx tsx script/components-json/build.ts --storybook-data 'storybook-static/index.json'
120+
working-directory: packages/react
121+
- name: Build hooks.json
122+
run: npx tsx script/hooks-json/build.ts
123+
working-directory: packages/react
124+
103125
vrt-runner:
104126
runs-on: ubuntu-latest-16-cores
105127
strategy:
106128
fail-fast: false
107129
matrix:
108130
shard: [1, 2, 3, 4]
131+
needs: build-components-json
109132
steps:
110133
- uses: actions/checkout@v4
111134
- name: Use Node.js 20.x
@@ -178,6 +201,7 @@ jobs:
178201
fail-fast: false
179202
matrix:
180203
shard: [1, 2, 3, 4]
204+
needs: build-components-json
181205
env:
182206
VITE_PRIMER_REACT_CSS_MODULES_TEAM: 1
183207
VITE_PRIMER_REACT_CSS_MODULES_STAFF: 1
@@ -248,28 +272,6 @@ jobs:
248272
if: ${{ needs.vrt-runner-all-flags.result == 'failure' }}
249273
run: exit 1
250274

251-
build-components-json:
252-
runs-on: ubuntu-latest
253-
steps:
254-
- name: Checkout repository
255-
uses: actions/checkout@v4
256-
- name: Use Node.js 20.x
257-
uses: actions/setup-node@v4
258-
with:
259-
node-version: 22
260-
cache: "npm"
261-
- name: Install dependencies
262-
run: npm ci
263-
- name: Build storybook to generate story IDs
264-
run: npm run build:storybook
265-
working-directory: packages/react
266-
- name: Build components.json
267-
run: npx tsx script/components-json/build.ts --storybook-data 'storybook-static/index.json'
268-
working-directory: packages/react
269-
- name: Build hooks.json
270-
run: npx tsx script/hooks-json/build.ts
271-
working-directory: packages/react
272-
273275
aat-runner:
274276
runs-on: ubuntu-latest-16-cores
275277
strategy:
@@ -349,6 +351,7 @@ jobs:
349351
fail-fast: false
350352
matrix:
351353
shard: [1, 2, 3, 4]
354+
needs: build-components-json
352355
env:
353356
VITE_PRIMER_REACT_CSS_MODULES_TEAM: 1
354357
VITE_PRIMER_REACT_CSS_MODULES_STAFF: 1

0 commit comments

Comments
 (0)