fix: add caching for Next.js build to improve deployment efficiency

This commit is contained in:
2025-10-29 22:45:49 -03:00
parent 4b047e0157
commit 28be7d1e1c

View File

@@ -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