👷(ci) put storybook build in a gh-pages sub folder
Our main goal doing this is to allow us to have multiple static build standing next to each other on our gh-pages.
This commit is contained in:
@@ -135,10 +135,9 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Publish storybook
|
name: Publish storybook
|
||||||
command: |
|
command: |
|
||||||
cd packages/react
|
|
||||||
git config user.email "funmoocbot@users.noreply.github.com"
|
git config user.email "funmoocbot@users.noreply.github.com"
|
||||||
git config user.name "FUN MOOC bot"
|
git config user.name "FUN MOOC bot"
|
||||||
yarn deploy-storybook
|
yarn deploy-ghpages
|
||||||
publish-packages:
|
publish-packages:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/node:18.18
|
- image: cimg/node:18.18
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,3 +28,4 @@ dist
|
|||||||
vite.config.ts.timestamp-*
|
vite.config.ts.timestamp-*
|
||||||
env.d
|
env.d
|
||||||
.turbo
|
.turbo
|
||||||
|
ghpages-output
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
**A design system and a components library.**
|
**A design system and a components library.**
|
||||||
|
|
||||||
<a href="https://openfun.github.io/cunningham"><b>📚 Documentation</b></a> •
|
<a href="https://openfun.github.io/cunningham/storybook"><b>📚 Documentation</b></a> •
|
||||||
<a href="https://www.figma.com/file/JbPT1R6YUFW4oH8jHvH960/DS-Cunningham---PUBLIC?type=design"><b>🖌️ Figma</b></a>
|
<a href="https://www.figma.com/file/JbPT1R6YUFW4oH8jHvH960/DS-Cunningham---PUBLIC?type=design"><b>🖌️ Figma</b></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
"test-ci": "turbo run test-ci",
|
"test-ci": "turbo run test-ci",
|
||||||
"lint": "turbo run lint",
|
"lint": "turbo run lint",
|
||||||
"deploy": "turbo run deploy",
|
"deploy": "turbo run deploy",
|
||||||
"format": "prettier --write \"**/*.{ts,tsx,md,json,cjs,js}\""
|
"format": "prettier --write \"**/*.{ts,tsx,md,json,cjs,js}\"",
|
||||||
|
"predeploy-ghpages": "./scripts/predeploy-ghpages",
|
||||||
|
"deploy-ghpages": "storybook-to-ghpages --existing-output-dir ./ghpages-output"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
|
|||||||
@@ -39,9 +39,7 @@
|
|||||||
"test-watch": "vitest",
|
"test-watch": "vitest",
|
||||||
"coverage": "vitest run --coverage",
|
"coverage": "vitest run --coverage",
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build"
|
||||||
"predeploy-storybook": "yarn build-storybook && touch ./storybook-static/.nojekyll",
|
|
||||||
"deploy-storybook": "storybook-to-ghpages --existing-output-dir ./storybook-static"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource-variable/roboto-flex": "5.0.8",
|
"@fontsource-variable/roboto-flex": "5.0.8",
|
||||||
|
|||||||
9
scripts/predeploy-ghpages
Executable file
9
scripts/predeploy-ghpages
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
rm -rf ghpages-output
|
||||||
|
mkdir -p ghpages-output/storybook
|
||||||
|
|
||||||
|
cd packages/react && yarn build-storybook
|
||||||
|
cd ../..
|
||||||
|
mv packages/react/storybook-static/* ghpages-output/storybook
|
||||||
|
|
||||||
|
touch ./ghpages-output/.nojekyll
|
||||||
|
touch ./ghpages-output/storybook/.nojekyll
|
||||||
Reference in New Issue
Block a user