From cce1e261427b499f989d0ad5bfcf3bf91a9c613a Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 22:52:14 +0530 Subject: [PATCH 01/12] feat: updated deploy action to have pnpm installed --- .github/workflows/deploy-gh-pages.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index 1b60cda..477ed4f 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -13,6 +13,31 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22.2.0 + + - name: Install pnpm + run: | + cd frontend + npm install -g pnpm + + - name: Cache pnpm store + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + if: steps.pnpm-cache.outputs.cache-hit != 'true' + run: | + cd frontend + pnpm install + + - name: Download Artifacts uses: actions/download-artifact@v4 with: From 9900e53180bdf55c317985b711c6f5da4efabbe7 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 22:52:28 +0530 Subject: [PATCH 02/12] fix: prevent install of packages --- .github/workflows/deploy-gh-pages.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index 477ed4f..10281db 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -30,13 +30,6 @@ jobs: key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - if: steps.pnpm-cache.outputs.cache-hit != 'true' - run: | - cd frontend - pnpm install - - name: Download Artifacts uses: actions/download-artifact@v4 From 704c066cfdc778901cc4a3b5c1ccced4fe132fe1 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 22:58:01 +0530 Subject: [PATCH 03/12] feat: update pre-deploy command --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 3fb2a3e..da313fe 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,7 +18,7 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", - "predeploy": "npm run build", + "predeploy": "pnpm run build", "deploy": "gh-pages -d build", "eject": "react-scripts eject", "heroku-prebuild": "npm install -g serve" From cb288fadae6bcdfd271e5510d51f479b17af75b0 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:02:37 +0530 Subject: [PATCH 04/12] feat: remove pre-deploy script --- frontend/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index da313fe..05edfaa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,7 +18,6 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", - "predeploy": "pnpm run build", "deploy": "gh-pages -d build", "eject": "react-scripts eject", "heroku-prebuild": "npm install -g serve" From 18b347ef53a695c799555cb0c90b5c831f06af46 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:03:40 +0530 Subject: [PATCH 05/12] feat: install deps --- .github/workflows/deploy-gh-pages.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index 10281db..ce9927d 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -30,6 +30,12 @@ jobs: key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + if: steps.pnpm-cache.outputs.cache-hit != 'true' + run: | + cd frontend + pnpm install - name: Download Artifacts uses: actions/download-artifact@v4 From a22b14a34395139b4945572297aa2a8dc3287996 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:11:33 +0530 Subject: [PATCH 06/12] feat: changed download artifact uses --- .github/workflows/deploy-gh-pages.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index ce9927d..cc0fe42 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -38,8 +38,11 @@ jobs: pnpm install - name: Download Artifacts - uses: actions/download-artifact@v4 + id: download-artifact + uses: dawidd6/action-download-artifact@v5 + workflow: build-ci-test.yaml with: + github_token: ${{secrets.GITHUB_TOKEN}} path: ./frontend/build/ - name: Push to deployment From f246eb48e22aed1e7cb5b1e394033b204f765b43 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:13:45 +0530 Subject: [PATCH 07/12] fix: update workflow name --- .github/workflows/deploy-gh-pages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index cc0fe42..ab01098 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -40,8 +40,8 @@ jobs: - name: Download Artifacts id: download-artifact uses: dawidd6/action-download-artifact@v5 - workflow: build-ci-test.yaml with: + workflow: build-ci-test.yaml github_token: ${{secrets.GITHUB_TOKEN}} path: ./frontend/build/ From e1da9ddeea40fa0096ef425eb139d825334c21dd Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:15:21 +0530 Subject: [PATCH 08/12] feat: add predeploy script --- frontend/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/package.json b/frontend/package.json index 05edfaa..da313fe 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,6 +18,7 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", + "predeploy": "pnpm run build", "deploy": "gh-pages -d build", "eject": "react-scripts eject", "heroku-prebuild": "npm install -g serve" From 4e1d9ac646f41da095d1105c7bad82b62f0b8ef4 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:16:39 +0530 Subject: [PATCH 09/12] fix: remove predeploy script as it rebuilds the app --- frontend/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index da313fe..05edfaa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,7 +18,6 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", - "predeploy": "pnpm run build", "deploy": "gh-pages -d build", "eject": "react-scripts eject", "heroku-prebuild": "npm install -g serve" From 50692dae100d80b85946eba3d9cc8b30c92150e5 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:28:49 +0530 Subject: [PATCH 10/12] feat: added action to deploy to github pages --- .github/workflows/deploy-gh-pages.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index ab01098..bb04186 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -45,7 +45,7 @@ jobs: github_token: ${{secrets.GITHUB_TOKEN}} path: ./frontend/build/ - - name: Push to deployment - run: | - cd frontend - pnpm run deploy \ No newline at end of file + name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: ./frontend/build \ No newline at end of file From 4c4f3d5b8a84466025775c315394764a9598ecbe Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:30:11 +0530 Subject: [PATCH 11/12] fix: yaml syntax --- .github/workflows/deploy-gh-pages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index bb04186..bdd5aef 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -45,7 +45,7 @@ jobs: github_token: ${{secrets.GITHUB_TOKEN}} path: ./frontend/build/ - name: Deploy 🚀 + - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: folder: ./frontend/build \ No newline at end of file From 2130c4ee94258d569ee3188080c47abdc360a956 Mon Sep 17 00:00:00 2001 From: Bikram Ghuku Date: Sun, 9 Jun 2024 23:30:54 +0530 Subject: [PATCH 12/12] fix: yaml syntax --- .github/workflows/deploy-gh-pages.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index bdd5aef..63dc014 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -46,6 +46,6 @@ jobs: path: ./frontend/build/ - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: ./frontend/build \ No newline at end of file + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: ./frontend/build \ No newline at end of file