@@ -2,7 +2,7 @@ name: CI/CD Pipeline
22
33on :
44 push :
5- branches : [main, 'feature/*']
5+ branches : [main, 'feature/*', 'tests/*' ]
66 pull_request :
77 branches : [main]
88
@@ -233,17 +233,21 @@ jobs:
233233
234234 - name : Serve Storybook & Run E2E tests
235235 run : |
236+ # Set up directory structure for serving with /design-system/ base path
237+ mkdir -p storybook-serve/design-system
238+ cp -r packages/design-system/storybook-static/* storybook-serve/design-system/
239+
236240 # Start HTTP server for Storybook
237- npx http-server packages/design-system/ storybook-static -p 6006 &
241+ npx http-server storybook-serve -p 6006 &
238242
239243 # Wait for server to be ready
240- timeout 30 bash -c 'until curl -f http://localhost:6006/iframe.html; do sleep 1; done'
244+ timeout 30 bash -c 'until curl -f http://localhost:6006/design-system/ iframe.html; do sleep 1; done'
241245
242246 # Run E2E tests
243247 pnpm --filter=@wallarm/design-system exec playwright test --shard=${{ matrix.shard }}/3 --project=chromium
244248 env :
245249 CI : true
246- STORYBOOK_URL : http://localhost:6006
250+ STORYBOOK_URL : http://localhost:6006/design-system
247251
248252 - name : Upload test results
249253 uses : actions/upload-artifact@v4
@@ -308,11 +312,15 @@ jobs:
308312
309313 - name : Update screenshots
310314 run : |
315+ # Set up directory structure for serving with /design-system/ base path
316+ mkdir -p storybook-serve/design-system
317+ cp -r packages/design-system/storybook-static/* storybook-serve/design-system/
318+
311319 # Start HTTP server for Storybook
312- npx http-server packages/design-system/ storybook-static -p 6006 &
320+ npx http-server storybook-serve -p 6006 &
313321
314322 # Wait for server to be ready
315- timeout 30 bash -c 'until curl -f http://localhost:6006/iframe.html; do sleep 1; done'
323+ timeout 30 bash -c 'until curl -f http://localhost:6006/design-system/ iframe.html; do sleep 1; done'
316324
317325 # Update screenshots
318326 pnpm --filter=@wallarm/design-system exec playwright test \
@@ -321,7 +329,7 @@ jobs:
321329 --update-snapshots
322330 env :
323331 CI : false
324- STORYBOOK_URL : http://localhost:6006
332+ STORYBOOK_URL : http://localhost:6006/design-system
325333
326334 - name : Upload updated screenshots
327335 uses : actions/upload-artifact@v4
0 commit comments