From 28be7d1e1ce46c095075ec80efe11621567d32fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Loureiro?= Date: Wed, 29 Oct 2025 22:45:49 -0300 Subject: [PATCH] fix: add caching for Next.js build to improve deployment efficiency --- .gitea/workflows/deploy.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 57f45e9..c04a926 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -10,6 +10,7 @@ jobs: runs-on: website-deploy-runner env: DOTNET_INSTALL_DIR: "$HOME/.dotnet" + NEXT_TELEMETRY_DISABLED: '1' steps: - name: Checkout Code @@ -36,6 +37,14 @@ jobs: restore-keys: | ${{ runner.os }}-node- + - name: Cache Next.js build cache + uses: actions/cache@v4 + with: + path: frontend/.next/cache + key: ${{ runner.os }}-next-cache-${{ hashFiles('frontend/package-lock.json') }}-${{ env.NODE_VERSION || 'node' }} + restore-keys: | + ${{ runner.os }}-next-cache- + - name: Create Backend appsettings.Production.json run: | echo "Creating backend appsettings.Production.json file..." @@ -107,6 +116,8 @@ jobs: echo "rsync backend ecosystem exit: $?" - name: Restart Applications with PM2 + env: + DEPLOY_PATH: ${{ vars.DEPLOY_PATH }} run: | echo "Restarting applications with PM2..." restart-portfolio \ No newline at end of file