Skip to content

Commit

Permalink
Fix Prod Storybook deployment (#5535)
Browse files Browse the repository at this point in the history
* Fix prod storybook deployment

* Add npm scripts
  • Loading branch information
hussam-i-am authored Jan 13, 2025
1 parent be42cc6 commit 8b96591
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"start": "concurrently npm:start:*",
"start:storybook": "npm run start:storybook -w @primer/react",
"build:storybook": "script/build-storybook",
"build:storybook:preview": "script/build-storybook preview",
"build:storybook:preview_with_reports": "script/build-storybook preview_with_reports",
"build:docs": "NODE_OPTIONS=--openssl-legacy-provider script/build-docs",
"build:docs:preview": "NODE_OPTIONS=--openssl-legacy-provider script/build-docs preview",
"build:docs:preview_with_reports": "NODE_OPTIONS=--openssl-legacy-provider script/build-docs preview_with_reports",
Expand Down
4 changes: 2 additions & 2 deletions script/build-docs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ set -e

if [ "$1" == "preview" ]; then
export DEPLOY_ENV="preview"
npm run build:storybook preview
npm run build:storybook:preview
elif [ "$1" == "preview_with_reports" ]; then
export DEPLOY_ENV="preview"
npm run build:storybook preview_with_reports
npm run build:storybook:preview_with_reports
else
export DEPLOY_ENV="production"
npm run build:storybook
Expand Down
2 changes: 1 addition & 1 deletion script/build-storybook
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npx storybook build -o ../../docs/public/storybook
if [ "$1" == "preview_with_reports" ]; then
# Move index_with_reports.html to the right location
cp .storybook/index_with_reports.html ../../docs/public/index.html
else
elif [ "$1" == "preview" ]; then
# Move index.html to the right location
cp .storybook/index.html ../../docs/public/index.html
fi
Expand Down

0 comments on commit 8b96591

Please sign in to comment.