Skip to content

Commit 395e3e5

Browse files
Ensure storybook 8 builds with default build commands and do not generate s6 PR links (#5220)
* Default to storybook 8 building and do not generate s6 PR links * Update deployment target * revert lint change as there are so many lint fixes need to be seperate pr
1 parent 8931b78 commit 395e3e5

File tree

4 files changed

+9
-92
lines changed

4 files changed

+9
-92
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,6 @@ concurrency:
2020
permissions: read-all
2121

2222
jobs:
23-
files_changed:
24-
name: Determine Changes
25-
runs-on: ubuntu-latest
26-
timeout-minutes: 3
27-
# Map a step output to a job output
28-
outputs:
29-
storybook8_changes: ${{ steps.changes.outputs.storybook8 }}
30-
steps:
31-
# Checks-out your repository under $GITHUB_WORKSPACE so job can access it
32-
- uses: actions/checkout@v4
33-
- uses: dorny/paths-filter@v3
34-
id: changes
35-
with:
36-
# token: ${{ secrets.GITHUB_TOKEN }}
37-
filters: |
38-
storybook8:
39-
- 'packages/storybook8/**'
40-
4123
# get matrix for ci-jobs
4224
get_matrix:
4325
name: Load CI Matrix Details
@@ -566,8 +548,7 @@ jobs:
566548
working-directory: packages/storybook
567549

568550
build_storybook8:
569-
needs: [get_matrix, files_changed]
570-
if: needs.files_changed.outputs.storybook8_changes == 'true'
551+
needs: get_matrix
571552
name: Build Storybook v8 (${{ matrix.flavor }})
572553
strategy:
573554
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
@@ -590,11 +571,11 @@ jobs:
590571
run: rush install --max-install-attempts 3
591572
- name: Build
592573
if: ${{ matrix.flavor == 'beta' || matrix.flavor == 'beta-release' }}
593-
run: rushx build-s8
574+
run: rushx build
594575
working-directory: packages/storybook8
595576
- name: Tests
596577
if: ${{ matrix.flavor == 'beta' || matrix.flavor == 'beta-release' }}
597-
run: rushx test-s8
578+
run: rushx test
598579
working-directory: packages/storybook8
599580

600581
build_calling_sample:

.github/workflows/deploy-storybook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ jobs:
4848
# storybook requires the env vars to be in a .env file for access in the manager.ts
4949
run: |
5050
echo TELEMETRY_INSTRUMENTATION_KEY=${{ secrets.TELEMETRY_INSTRUMENTATION_KEY }} > .env
51-
working-directory: ./packages/storybook
51+
working-directory: ./packages/storybook8
5252
env:
5353
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
5454

5555
- name: Upload Storybook GH Pages Artifact
5656
uses: actions/upload-pages-artifact@v3
5757
with:
58-
path: ./packages/storybook/storybook-static
58+
path: ./packages/storybook8/storybook-static
5959

6060
- name: Deploy to GitHub Pages
6161
uses: actions/deploy-pages@v4

.github/workflows/publish-chromatic.yml

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: 'Publish Chromatic'
33
on:
44
pull_request:
55
paths:
6-
- packages/storybook/**
76
- packages/storybook8/**
87
- packages/react-components/**
98
- packages/react-composites/**
@@ -19,66 +18,6 @@ concurrency:
1918

2019
jobs:
2120
chromatic_deployment:
22-
name: Publish Chromatic Storybook 6
23-
runs-on: ubuntu-latest
24-
permissions:
25-
packages: write
26-
pull-requests: write
27-
steps:
28-
- uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 0
31-
32-
- name: Use Node.js 20.x
33-
uses: actions/setup-node@v4
34-
with:
35-
node-version: 20.x
36-
37-
- name: Restore node_modules from cache
38-
uses: actions/cache@v4
39-
with:
40-
path: common/temp/pnpm-store
41-
key: ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
42-
43-
- name: Install Rush
44-
run: npm install -g @microsoft/rush@$(jq -r '.rushVersion' "rush.json")
45-
46-
- name: Install Dependencies
47-
run: rush install --max-install-attempts 3
48-
49-
- name: Publish Chromatic
50-
id: publish_chromatic
51-
uses: chromaui/action@v1
52-
with:
53-
workingDir: ./packages/storybook
54-
buildScriptName: build:dev
55-
token: ${{ secrets.GITHUB_TOKEN }}
56-
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
57-
allowConsoleErrors: true
58-
59-
- name: Format storybook URL
60-
id: storybook_url
61-
# Get the url from chromatic job then remove the iframe.html at the end of the url (this looks like a bug)
62-
run: |
63-
storybookurl=${{ steps.publish_chromatic.outputs.storybookUrl }}
64-
echo "Storybook URL before: $storybookurl"
65-
newurl=${storybookurl/%iframe.html}
66-
echo "Storybook URL after: $newurl"
67-
echo "url=$newurl" >> $GITHUB_OUTPUT
68-
69-
- name: Add Storybook URL as Issue Comment
70-
if: github.event_name == 'pull_request'
71-
uses: actions/github-script@v3
72-
with:
73-
github-token: ${{secrets.GITHUB_TOKEN}}
74-
script: |
75-
github.issues.createComment({
76-
issue_number: context.issue.number,
77-
owner: context.repo.owner,
78-
repo: context.repo.repo,
79-
body: 'Storybook 6 URL ${{ steps.storybook_url.outputs.url }}'
80-
})
81-
chromatic_deployment8:
8221
name: Publish Chromatic Storybook 8
8322
runs-on: ubuntu-latest
8423
permissions:
@@ -111,7 +50,7 @@ jobs:
11150
uses: chromaui/action@v1
11251
with:
11352
workingDir: ./packages/storybook8
114-
buildScriptName: build:dev-s8
53+
buildScriptName: build:dev
11554
token: ${{ secrets.GITHUB_TOKEN }}
11655
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
11756
allowConsoleErrors: true

packages/storybook8/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
"version": "1.20.0-beta.0",
44
"description": "Azure Communication Services UI Library Storybook",
55
"scripts": {
6-
"build": "echo Storybook 8 build via 'build-s8' target",
7-
"build:dev": "echo Storybook 8 build via 'build:dev-s8' target",
8-
"build-s8": "cross-env NODE_ENV=production node ./scripts/build.mjs",
9-
"build:dev-s8": "cross-env NODE_ENV=development node ./scripts/build.mjs",
6+
"build": "cross-env NODE_ENV=production node ./scripts/build.mjs",
7+
"build:dev": "cross-env NODE_ENV=development node ./scripts/build.mjs",
108
"clean": "",
119
"start": "cross-env NODE_ENV=development node ./scripts/start.mjs",
1210
"storybook": "storybook",
13-
"test": "echo Storybook 8 test via 'test-s8' target",
14-
"test-s8": "node ./scripts/test.mjs",
11+
"test": "node ./scripts/test.mjs",
1512
"test:ci-coverage": "echo skip",
1613
"test:coverage": "rushx test --coverage --coverageReporters=lcov",
1714
"test:snippets": "tsc --p tsconfig.snippets.json",

0 commit comments

Comments
 (0)