From 125c6cf2691dcfbf06a9a940a5426dc8827f1d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Loureiro?= Date: Mon, 9 Jun 2025 16:31:49 -0300 Subject: [PATCH] fix: update frontend environment file and improve caching for dependencies and build artifacts --- .gitea/workflows/deploy.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 8b72688..f28d8d6 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -38,19 +38,19 @@ jobs: echo "Creating frontend .env.local file..." cd frontend # The BACKEND_URL is not needed because Traefik will handle routing /api - echo "NEXT_PUBLIC_GITHUB_URL=${{ vars.NEXT_PUBLIC_GITHUB_URL }}" >> .env - echo "NEXT_PUBLIC_LINKEDIN_URL=${{ vars.NEXT_PUBLIC_LINKEDIN_URL }}" >> .env + echo "NEXT_PUBLIC_GITHUB_URL=${{ vars.NEXT_PUBLIC_GITHUB_URL }}" >> .env.local + echo "NEXT_PUBLIC_LINKEDIN_URL=${{ vars.NEXT_PUBLIC_LINKEDIN_URL }}" >> .env.local - - name: Cache Node Modules and Next.js Build - # Caching node_modules and Next.js build cache to speed up subsequent builds + - name: Cache Dependencies and Build Artifacts uses: actions/cache@v4 with: path: | - ~/.npm - ${{ gitea.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + backend/node_modules + frontend/node_modules + frontend/.next/cache + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- + ${{ runner.os }}-node- - name: Install Dependencies and Build run: |