From 2514f3b48f428e24e08f6785bcc2447c586d1b1f Mon Sep 17 00:00:00 2001 From: Ehsan Heydari <19144304+ehsan-github@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:07:46 +0100 Subject: [PATCH] [HFRONT-1135]: upgrade gh pages (#583) * fix(gh-pages): remove redundant npm package * Patch update * ci(gh-pages): fix deployment of storybook to github pages --- .github/workflows/ci.yml | 35 +++++++++---- package.json | 3 +- pnpm-lock.yaml | 103 ++------------------------------------- 3 files changed, 31 insertions(+), 110 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8fd5ad9b..37a15cede 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,23 @@ on: push: branches: - dev + +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: 'pages' + cancel-in-progress: false + jobs: build-and-deploy-storybook: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout 🗒️ @@ -40,16 +55,16 @@ jobs: - name: Install dependencies run: pnpm install - - name: Build Quartz - run: | - pnpm build + - run: NODE_OPTIONS=--max_old_space_size=4096 pnpm run build-storybook - - name: Build StoryBook🤖 - run: | - NODE_OPTIONS=--max_old_space_size=4096 pnpm run build-storybook + - name: Setup Pages + uses: actions/configure-pages@v4 - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.5.0 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - branch: gh-pages - folder: storybook-static + path: './storybook-static' + + - name: Deploy to GitHub Pages 🚀 + id: deployment + uses: actions/deploy-pages@v4 diff --git a/package.json b/package.json index a5f72bce9..735d05c76 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,6 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "gh-pages": "^5.0.0", "jest": "29.7.0", "npm-run-all": "^4.1.5", "prettier": "^3.2.5", @@ -137,7 +136,7 @@ "typescript": "^5.3.3", "vite": "^4.5.2", "vite-plugin-css-injected-by-js": "^3.4.0", - "vite-plugin-dts": "^3.7.2", + "vite-plugin-dts": "^3.7.3", "vite-plugin-svgr": "^4.2.0", "vite-plugin-turbosnap": "^1.0.3", "wait-on": "^7.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3039c2315..c0bd056a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,9 +214,6 @@ devDependencies: eslint-plugin-react-hooks: specifier: ^4.6.0 version: 4.6.0(eslint@8.56.0) - gh-pages: - specifier: ^5.0.0 - version: 5.0.0 jest: specifier: 29.7.0 version: 29.7.0(@types/node@20.11.19)(ts-node@10.9.1) @@ -254,8 +251,8 @@ devDependencies: specifier: ^3.4.0 version: 3.4.0(vite@4.5.2) vite-plugin-dts: - specifier: ^3.7.2 - version: 3.7.2(@types/node@20.11.19)(typescript@5.3.3)(vite@4.5.2) + specifier: ^3.7.3 + version: 3.7.3(@types/node@20.11.19)(typescript@5.3.3)(vite@4.5.2) vite-plugin-svgr: specifier: ^4.2.0 version: 4.2.0(vite@4.5.2) @@ -8092,23 +8089,11 @@ packages: is-string: 1.0.7 dev: true - /array-union@1.0.2: - resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} - engines: {node: '>=0.10.0'} - dependencies: - array-uniq: 1.0.3 - dev: true - /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: true - /array-uniq@1.0.3: - resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} - engines: {node: '>=0.10.0'} - dev: true - /array.prototype.findlastindex@1.2.3: resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} engines: {node: '>= 0.4'} @@ -8900,10 +8885,6 @@ packages: delayed-stream: 1.0.0 dev: true - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true - /commander@3.0.2: resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} dev: true @@ -9644,10 +9625,6 @@ packages: resolution: {integrity: sha512-YYCy+goe3UqZqa3MOQCI5Mx/6HdBLzXL/mkbGCEWL3sP3Z1BP9zqAzeD3YEmLZlespYGFtyM8tRp5i2vfaUGCA==} dev: true - /email-addresses@5.0.0: - resolution: {integrity: sha512-4OIPYlA6JXqtVn8zpHpGiI7vE6EQOAg16aGnDMIAlZVinnoZ8208tW1hAbjWydgN/4PLTT9q+O1K6AH/vALJGw==} - dev: true - /emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} @@ -10489,20 +10466,6 @@ packages: minimatch: 5.1.6 dev: true - /filename-reserved-regex@2.0.0: - resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} - engines: {node: '>=4'} - dev: true - - /filenamify@4.3.0: - resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} - engines: {node: '>=8'} - dependencies: - filename-reserved-regex: 2.0.0 - strip-outer: 1.0.1 - trim-repeated: 1.0.0 - dev: true - /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -10905,20 +10868,6 @@ packages: get-intrinsic: 1.2.2 dev: true - /gh-pages@5.0.0: - resolution: {integrity: sha512-Nqp1SjkPIB94Xw/3yYNTUL+G2dxlhjvv1zeN/4kMC1jfViTEqhtVz/Ba1zSXHuvXCN9ADNS1dN4r5/J/nZWEQQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - async: 3.2.4 - commander: 2.20.3 - email-addresses: 5.0.0 - filenamify: 4.3.0 - find-cache-dir: 3.3.2 - fs-extra: 8.1.0 - globby: 6.1.0 - dev: true - /giget@1.1.2: resolution: {integrity: sha512-HsLoS07HiQ5oqvObOI+Qb2tyZH4Gj5nYGfF9qQcZNrPw+uEFhdXtgJr01aO2pWadGHucajYDLxxbtQkm97ON2A==} hasBin: true @@ -11090,17 +11039,6 @@ packages: unicorn-magic: 0.1.0 dev: true - /globby@6.1.0: - resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} - engines: {node: '>=0.10.0'} - dependencies: - array-union: 1.0.2 - glob: 7.2.3 - object-assign: 4.1.1 - pify: 2.3.0 - pinkie-promise: 2.0.1 - dev: true - /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -12851,7 +12789,7 @@ packages: engines: {node: '>=6'} dependencies: pify: 4.0.1 - semver: 5.7.2 + semver: 7.5.4 dev: true /make-dir@3.1.0: @@ -13828,11 +13766,6 @@ packages: hasBin: true dev: true - /pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - dev: true - /pify@3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} @@ -13843,18 +13776,6 @@ packages: engines: {node: '>=6'} dev: true - /pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - dependencies: - pinkie: 2.0.4 - dev: true - - /pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - dev: true - /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} @@ -15344,13 +15265,6 @@ packages: engines: {node: '>=8'} dev: true - /strip-outer@1.0.1: - resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} - engines: {node: '>=0.10.0'} - dependencies: - escape-string-regexp: 1.0.5 - dev: true - /style-mod@4.1.0: resolution: {integrity: sha512-Ca5ib8HrFn+f+0n4N4ScTIA9iTOQ7MaGS1ylHcoVqW9J7w2w8PzN6g9gKmTYgGEBH8e120+RCmhpje6jC5uGWA==} dev: false @@ -15592,13 +15506,6 @@ packages: hasBin: true dev: true - /trim-repeated@1.0.0: - resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} - engines: {node: '>=0.10.0'} - dependencies: - escape-string-regexp: 1.0.5 - dev: true - /ts-api-utils@1.0.1(typescript@5.3.3): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} @@ -16100,8 +16007,8 @@ packages: vite: 4.5.2(@types/node@20.11.19) dev: true - /vite-plugin-dts@3.7.2(@types/node@20.11.19)(typescript@5.3.3)(vite@4.5.2): - resolution: {integrity: sha512-kg//1nDA01b8rufJf4TsvYN8LMkdwv0oBYpiQi6nRwpHyue+wTlhrBiqgipdFpMnW1oOYv6ywmzE5B0vg6vSEA==} + /vite-plugin-dts@3.7.3(@types/node@20.11.19)(typescript@5.3.3)(vite@4.5.2): + resolution: {integrity: sha512-26eTlBYdpjRLWCsTJebM8vkCieE+p9gP3raf+ecDnzzK5E3FG6VE1wcy55OkRpfWWVlVvKkYFe6uvRHYWx7Nog==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: typescript: '*'