Remove dependency on @storybook/storybook-deployer (#5144)
This commit is contained in:
Родитель
31b697761c
Коммит
a167bb55f9
|
@ -44,11 +44,20 @@ jobs:
|
|||
- name: Run Storybook tests
|
||||
run: rush test -o storybook
|
||||
|
||||
- name: Deploy Storybook
|
||||
- name: Copy .env values
|
||||
# storybook requires the env vars to be in a .env file for access in the manager.ts
|
||||
run: |
|
||||
echo TELEMETRY_INSTRUMENTATION_KEY=${{ secrets.TELEMETRY_INSTRUMENTATION_KEY }} > .env
|
||||
npm run deploy-storybook -- --ci
|
||||
working-directory: ./packages/storybook
|
||||
env:
|
||||
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload Storybook GH Pages Artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./packages/storybook/storybook-static
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: actions/deploy-pages@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -7914,17 +7914,6 @@ packages:
|
|||
util-deprecate: 1.0.2
|
||||
dev: false
|
||||
|
||||
/@storybook/storybook-deployer@2.8.16:
|
||||
resolution: {integrity: sha512-DRQrjyLKaRLXMYo7SNUznyGabtOLJ0b9yfBKNVMu6PsUHJifGPabXuNXmRPZ6qvyhHUSKLQgeLaX8L3Og6uFUg==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
git-url-parse: 12.0.0
|
||||
glob: 7.2.3
|
||||
parse-repo: 1.0.4
|
||||
shelljs: 0.8.5
|
||||
yargs: 15.4.1
|
||||
dev: false
|
||||
|
||||
/@storybook/telemetry@6.5.16(eslint@8.57.0)(react-dom@18.3.1)(react@18.3.1)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-CWr5Uko1l9jJW88yTXsZTj/3GTabPvw0o7pDPOXPp8JRZiJTxv1JFaFCafhK9UzYbgcRuGfCC8kEWPZims7iKA==}
|
||||
dependencies:
|
||||
|
@ -25218,7 +25207,6 @@ packages:
|
|||
'@storybook/manager-webpack5': 6.5.16(eslint@8.57.0)(react-dom@18.3.1)(react@18.3.1)(typescript@5.4.5)
|
||||
'@storybook/node-logger': 6.5.16
|
||||
'@storybook/react': 6.5.16(@babel/core@7.25.2)(@storybook/builder-webpack5@6.5.14)(@storybook/manager-webpack5@6.5.16)(eslint@8.57.0)(react-dom@18.3.1)(react@18.3.1)(require-from-string@2.0.2)(typescript@5.4.5)
|
||||
'@storybook/storybook-deployer': 2.8.16
|
||||
'@storybook/theming': 6.5.16(react-dom@18.3.1)(react@18.3.1)
|
||||
'@testing-library/jest-dom': 6.5.0
|
||||
'@types/jest': 29.5.12
|
||||
|
@ -25361,7 +25349,6 @@ packages:
|
|||
'@storybook/preview-api': 8.2.9(storybook@8.2.9)
|
||||
'@storybook/react': 8.2.9(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.9)(typescript@5.4.5)
|
||||
'@storybook/react-webpack5': 8.2.9(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.9)(typescript@5.4.5)
|
||||
'@storybook/storybook-deployer': 2.8.16
|
||||
'@storybook/test-runner': 0.17.0(@types/node@20.14.12)(storybook@8.2.9)(ts-node@10.9.2)
|
||||
'@storybook/theming': 8.2.9(storybook@8.2.9)
|
||||
'@testing-library/jest-dom': 6.5.0
|
||||
|
|
|
@ -9041,17 +9041,6 @@ packages:
|
|||
util-deprecate: 1.0.2
|
||||
dev: false
|
||||
|
||||
/@storybook/storybook-deployer@2.8.16:
|
||||
resolution: {integrity: sha512-DRQrjyLKaRLXMYo7SNUznyGabtOLJ0b9yfBKNVMu6PsUHJifGPabXuNXmRPZ6qvyhHUSKLQgeLaX8L3Og6uFUg==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
git-url-parse: 12.0.0
|
||||
glob: 7.2.3
|
||||
parse-repo: 1.0.4
|
||||
shelljs: 0.8.5
|
||||
yargs: 15.4.1
|
||||
dev: false
|
||||
|
||||
/@storybook/telemetry@6.5.16(eslint@8.57.0)(react-dom@18.3.1)(react@18.3.1)(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-CWr5Uko1l9jJW88yTXsZTj/3GTabPvw0o7pDPOXPp8JRZiJTxv1JFaFCafhK9UzYbgcRuGfCC8kEWPZims7iKA==}
|
||||
dependencies:
|
||||
|
@ -26873,7 +26862,6 @@ packages:
|
|||
'@storybook/manager-webpack5': 6.5.16(eslint@8.57.0)(react-dom@18.3.1)(react@18.3.1)(typescript@5.4.5)
|
||||
'@storybook/node-logger': 6.5.16
|
||||
'@storybook/react': 6.5.16(@babel/core@7.25.2)(@storybook/builder-webpack5@6.5.14)(@storybook/manager-webpack5@6.5.16)(eslint@8.57.0)(react-dom@18.3.1)(react@18.3.1)(require-from-string@2.0.2)(typescript@5.4.5)
|
||||
'@storybook/storybook-deployer': 2.8.16
|
||||
'@storybook/theming': 6.5.16(react-dom@18.3.1)(react@18.3.1)
|
||||
'@testing-library/jest-dom': 6.4.8
|
||||
'@types/jest': 29.5.12
|
||||
|
@ -27015,7 +27003,6 @@ packages:
|
|||
'@storybook/preview-api': 8.2.6(storybook@8.2.6)
|
||||
'@storybook/react': 8.2.6(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.6)(typescript@5.4.5)
|
||||
'@storybook/react-webpack5': 8.2.6(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.6)(typescript@5.4.5)
|
||||
'@storybook/storybook-deployer': 2.8.16
|
||||
'@storybook/test-runner': 0.17.0(@types/node@20.14.12)(storybook@8.2.6)(ts-node@10.9.2)
|
||||
'@storybook/theming': 8.2.6(storybook@8.2.6)
|
||||
'@testing-library/jest-dom': 6.4.8
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"build:dev": "cross-env NODE_ENV=development node ./scripts/build.mjs",
|
||||
"clean": "",
|
||||
"start": "cross-env NODE_ENV=development node ./scripts/start.mjs",
|
||||
"deploy-storybook": "node ./scripts/deploy.mjs",
|
||||
"test": "node ./scripts/test.mjs",
|
||||
"test:ci-coverage": "echo skip",
|
||||
"test:coverage": "rushx test --coverage --coverageReporters=lcov",
|
||||
|
@ -61,7 +60,6 @@
|
|||
"@storybook/manager-webpack5": "6.5.16",
|
||||
"@storybook/node-logger": "^6.5.14",
|
||||
"@storybook/react": "^6.5.14",
|
||||
"@storybook/storybook-deployer": "^2.8.16",
|
||||
"@storybook/theming": "^6.5.14",
|
||||
"@testing-library/jest-dom": "^6.4.8",
|
||||
"@types/jest": "^29.5.11",
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { getBuildFlavor, exec, getExtraEnv } from './common.mjs';
|
||||
import { quote } from 'shell-quote';
|
||||
|
||||
async function main() {
|
||||
if (getBuildFlavor() === 'stable') {
|
||||
throw new Error(
|
||||
'Can not deploy storybook from stable flavor environment. Please run `rush switch-flavor:beta` first.'
|
||||
);
|
||||
}
|
||||
await exec(
|
||||
quote(['npx', 'storybook-to-ghpages', '--script', 'build', ...process.argv.slice(2)]),
|
||||
await getExtraEnv()
|
||||
);
|
||||
}
|
||||
|
||||
await main();
|
|
@ -9,7 +9,6 @@
|
|||
"build:dev-s8": "cross-env NODE_ENV=development node ./scripts/build.mjs",
|
||||
"clean": "",
|
||||
"start": "cross-env NODE_ENV=development node ./scripts/start.mjs",
|
||||
"deploy-storybook": "node ./scripts/deploy.mjs",
|
||||
"storybook": "storybook",
|
||||
"test": "echo Storybook 8 test via 'test-s8' target",
|
||||
"test-s8": "node ./scripts/test.mjs",
|
||||
|
@ -66,7 +65,6 @@
|
|||
"@storybook/preview-api": "^8.2.6",
|
||||
"@storybook/react": "^8.2.6",
|
||||
"@storybook/react-webpack5": "^8.2.6",
|
||||
"@storybook/storybook-deployer": "^2.8.16",
|
||||
"@storybook/test-runner": "^0.17.0",
|
||||
"@storybook/theming": "^8.2.6",
|
||||
"@testing-library/jest-dom": "^6.4.8",
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { getBuildFlavor, exec } from './common.mjs';
|
||||
import { quote } from 'shell-quote';
|
||||
|
||||
async function main() {
|
||||
if (getBuildFlavor() === 'stable') {
|
||||
throw new Error(
|
||||
'Can not deploy storybook from stable flavor environment. Please run `rush switch-flavor:beta` first.'
|
||||
);
|
||||
}
|
||||
await exec(quote(['npx', 'storybook-to-ghpages', '--script', 'build', ...process.argv.slice(2)]));
|
||||
}
|
||||
|
||||
await main();
|
Загрузка…
Ссылка в новой задаче