ci: add step for deploying storybook to gh-pages

This commit is contained in:
Rickard Andersson 2023-08-21 14:18:43 +03:00
parent 3ce69737b2
commit 8e61e28672
3 changed files with 134 additions and 8 deletions

View File

@ -65,8 +65,10 @@ jobs:
run: npx playwright install --with-deps
- name: Build Storybook
run: yarn build-storybook --quiet
- name: Serve Storybook and run tests
- name: Run Storybook tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:127.0.0.1:6006 && yarn test-storybook"
- name: Update GitHub pages with built Storybook
run: yarn deploy-storybook

View File

@ -2,6 +2,7 @@
"name": "nimbus-gui",
"private": true,
"version": "0.0.0",
"homepage": "https://nimbus-gui.github.io/nimbus-gui",
"scripts": {
"dev": "NODE_ENV=development vite",
"build": "tsc -p . && vite build",
@ -9,7 +10,8 @@
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"test-storybook": "test-storybook"
"test-storybook": "test-storybook",
"deploy-storybook": "gh-pages -d storybook-static"
},
"resolutions": {
"@tamagui/web": "1.36.4",
@ -58,6 +60,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"eslint-plugin-storybook": "^0.6.13",
"gh-pages": "^6.0.0",
"prettier": "^3.0.1",
"storybook": "^7.2.0",
"storybook-addon-react-router-v6": "^2.0.5",

133
yarn.lock
View File

@ -7799,6 +7799,15 @@ __metadata:
languageName: node
linkType: hard
"array-union@npm:^1.0.1":
version: 1.0.2
resolution: "array-union@npm:1.0.2"
dependencies:
array-uniq: ^1.0.1
checksum: 82cec6421b6e6766556c484835a6d476a873f1b71cace5ab2b4f1b15b1e3162dc4da0d16f7a2b04d4aec18146c6638fe8f661340b31ba8e469fd811a1b45dc8d
languageName: node
linkType: hard
"array-union@npm:^2.1.0":
version: 2.1.0
resolution: "array-union@npm:2.1.0"
@ -7806,6 +7815,13 @@ __metadata:
languageName: node
linkType: hard
"array-uniq@npm:^1.0.1":
version: 1.0.3
resolution: "array-uniq@npm:1.0.3"
checksum: 1625f06b093d8bf279b81adfec6e72951c0857d65b5e3f65f053fffe9f9dd61c2fc52cff57e38a4700817e7e3f01a4faa433d505ea9e33cdae4514c334e0bf9e
languageName: node
linkType: hard
"asap@npm:~2.0.3, asap@npm:~2.0.6":
version: 2.0.6
resolution: "asap@npm:2.0.6"
@ -7866,7 +7882,7 @@ __metadata:
languageName: node
linkType: hard
"async@npm:^3.2.2, async@npm:^3.2.3":
"async@npm:^3.2.2, async@npm:^3.2.3, async@npm:^3.2.4":
version: 3.2.4
resolution: "async@npm:3.2.4"
checksum: 43d07459a4e1d09b84a20772414aa684ff4de085cbcaec6eea3c7a8f8150e8c62aa6cd4e699fe8ee93c3a5b324e777d34642531875a0817a35697522c1b02e89
@ -8673,6 +8689,13 @@ __metadata:
languageName: node
linkType: hard
"commander@npm:^11.0.0":
version: 11.0.0
resolution: "commander@npm:11.0.0"
checksum: 6621954e1e1d078b4991c1f5bbd9439ad37aa7768d6ab4842de1dbd4d222c8a27e1b8e62108b3a92988614af45031d5bb2a2aaa92951f4d0c934d1a1ac564bb4
languageName: node
linkType: hard
"commander@npm:^2.19.0, commander@npm:^2.20.0":
version: 2.20.3
resolution: "commander@npm:2.20.3"
@ -9523,6 +9546,13 @@ __metadata:
languageName: node
linkType: hard
"email-addresses@npm:^5.0.0":
version: 5.0.0
resolution: "email-addresses@npm:5.0.0"
checksum: e58a510e9caf105313025e1c81488d5391c6404f0bbd7874e8e36a4c14d1ced02ff271748146c13edfa3bd9ce9b25f1194f5369971d77087325f37ab193129bb
languageName: node
linkType: hard
"emittery@npm:^0.10.2":
version: 0.10.2
resolution: "emittery@npm:0.10.2"
@ -9872,7 +9902,7 @@ __metadata:
languageName: node
linkType: hard
"escape-string-regexp@npm:^1.0.5":
"escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5":
version: 1.0.5
resolution: "escape-string-regexp@npm:1.0.5"
checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410
@ -10400,6 +10430,24 @@ __metadata:
languageName: node
linkType: hard
"filename-reserved-regex@npm:^2.0.0":
version: 2.0.0
resolution: "filename-reserved-regex@npm:2.0.0"
checksum: 323a0020fd7f243238ffccab9d728cbc5f3a13c84b2c10e01efb09b8324561d7a51776be76f36603c734d4f69145c39a5d12492bf6142a28b50d7f90bd6190bc
languageName: node
linkType: hard
"filenamify@npm:^4.3.0":
version: 4.3.0
resolution: "filenamify@npm:4.3.0"
dependencies:
filename-reserved-regex: ^2.0.0
strip-outer: ^1.0.1
trim-repeated: ^1.0.0
checksum: 5b71a7ff8e958c8621957e6fbf7872024126d3b5da50f59b1634af3343ba1a69d4cc15cfe4ca4bbfa7c959ad4d98614ee51e6f1d9fa7326eef8ceda2da8cd74e
languageName: node
linkType: hard
"fill-range@npm:^7.0.1":
version: 7.0.1
resolution: "fill-range@npm:7.0.1"
@ -10450,7 +10498,7 @@ __metadata:
languageName: node
linkType: hard
"find-cache-dir@npm:^3.0.0, find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.2":
"find-cache-dir@npm:^3.0.0, find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1, find-cache-dir@npm:^3.3.2":
version: 3.3.2
resolution: "find-cache-dir@npm:3.3.2"
dependencies:
@ -10666,7 +10714,7 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:11.1.1, fs-extra@npm:^11.1.0":
"fs-extra@npm:11.1.1, fs-extra@npm:^11.1.0, fs-extra@npm:^11.1.1":
version: 11.1.1
resolution: "fs-extra@npm:11.1.1"
dependencies:
@ -10832,6 +10880,24 @@ __metadata:
languageName: node
linkType: hard
"gh-pages@npm:^6.0.0":
version: 6.0.0
resolution: "gh-pages@npm:6.0.0"
dependencies:
async: ^3.2.4
commander: ^11.0.0
email-addresses: ^5.0.0
filenamify: ^4.3.0
find-cache-dir: ^3.3.1
fs-extra: ^11.1.1
globby: ^6.1.0
bin:
gh-pages: bin/gh-pages.js
gh-pages-clean: bin/gh-pages-clean.js
checksum: 031f9070cdcd4fb71a2a8eabec049c885faa17e489a6e37e8f7dfa9bd649607560b0778b8e19a1d9295ebd614668e3854d860d48313cb7b23ee9f3884adef517
languageName: node
linkType: hard
"giget@npm:^1.0.0":
version: 1.1.2
resolution: "giget@npm:1.1.2"
@ -10907,7 +10973,7 @@ __metadata:
languageName: node
linkType: hard
"glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0":
"glob@npm:^7.0.3, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0":
version: 7.2.3
resolution: "glob@npm:7.2.3"
dependencies:
@ -10986,6 +11052,19 @@ __metadata:
languageName: node
linkType: hard
"globby@npm:^6.1.0":
version: 6.1.0
resolution: "globby@npm:6.1.0"
dependencies:
array-union: ^1.0.1
glob: ^7.0.3
object-assign: ^4.0.1
pify: ^2.0.0
pinkie-promise: ^2.0.0
checksum: 18109d6b9d55643d2b98b59c3cfae7073ccfe39829632f353d516cc124d836c2ddebe48a23f04af63d66a621b6d86dd4cbd7e6af906f2458a7fe510ffc4bd424
languageName: node
linkType: hard
"gopd@npm:^1.0.1":
version: 1.0.1
resolution: "gopd@npm:1.0.1"
@ -13847,6 +13926,7 @@ __metadata:
eslint-plugin-react-refresh: ^0.4.3
eslint-plugin-storybook: ^0.6.13
expo-modules-core: ^1.5.9
gh-pages: ^6.0.0
prettier: ^3.0.1
react: 18
react-color: ^2.19.3
@ -14076,7 +14156,7 @@ __metadata:
languageName: node
linkType: hard
"object-assign@npm:^4.1.0, object-assign@npm:^4.1.1":
"object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1":
version: 4.1.1
resolution: "object-assign@npm:4.1.1"
checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f
@ -14466,6 +14546,13 @@ __metadata:
languageName: node
linkType: hard
"pify@npm:^2.0.0":
version: 2.3.0
resolution: "pify@npm:2.3.0"
checksum: 9503aaeaf4577acc58642ad1d25c45c6d90288596238fb68f82811c08104c800e5a7870398e9f015d82b44ecbcbef3dc3d4251a1cbb582f6e5959fe09884b2ba
languageName: node
linkType: hard
"pify@npm:^4.0.1":
version: 4.0.1
resolution: "pify@npm:4.0.1"
@ -14473,6 +14560,22 @@ __metadata:
languageName: node
linkType: hard
"pinkie-promise@npm:^2.0.0":
version: 2.0.1
resolution: "pinkie-promise@npm:2.0.1"
dependencies:
pinkie: ^2.0.0
checksum: b53a4a2e73bf56b6f421eef711e7bdcb693d6abb474d57c5c413b809f654ba5ee750c6a96dd7225052d4b96c4d053cdcb34b708a86fceed4663303abee52fcca
languageName: node
linkType: hard
"pinkie@npm:^2.0.0":
version: 2.0.4
resolution: "pinkie@npm:2.0.4"
checksum: b12b10afea1177595aab036fc220785488f67b4b0fc49e7a27979472592e971614fa1c728e63ad3e7eb748b4ec3c3dbd780819331dad6f7d635c77c10537b9db
languageName: node
linkType: hard
"pirates@npm:^3.0.2":
version: 3.0.2
resolution: "pirates@npm:3.0.2"
@ -16349,6 +16452,15 @@ __metadata:
languageName: node
linkType: hard
"strip-outer@npm:^1.0.1":
version: 1.0.1
resolution: "strip-outer@npm:1.0.1"
dependencies:
escape-string-regexp: ^1.0.2
checksum: f8d65d33ca2b49aabc66bb41d689dda7b8b9959d320e3a40a2ef4d7079ff2f67ffb72db43f179f48dbf9495c2e33742863feab7a584d180fa62505439162c191
languageName: node
linkType: hard
"strnum@npm:^1.0.5":
version: 1.0.5
resolution: "strnum@npm:1.0.5"
@ -16692,6 +16804,15 @@ __metadata:
languageName: node
linkType: hard
"trim-repeated@npm:^1.0.0":
version: 1.0.0
resolution: "trim-repeated@npm:1.0.0"
dependencies:
escape-string-regexp: ^1.0.2
checksum: e25c235305b82c43f1d64a67a71226c406b00281755e4c2c4f3b1d0b09c687a535dd3c4483327f949f28bb89dc400a0bc5e5b749054f4b99f49ebfe48ba36496
languageName: node
linkType: hard
"ts-api-utils@npm:^1.0.1":
version: 1.0.1
resolution: "ts-api-utils@npm:1.0.1"