fix: update frontend environment file and improve caching for dependencies and build artifacts

This commit is contained in:
2025-06-09 16:31:49 -03:00
parent 9b04d2896d
commit 125c6cf269

View File

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