fix: update frontend environment file and improve caching for dependencies and build artifacts
This commit is contained in:
@@ -38,19 +38,19 @@ jobs:
|
|||||||
echo "Creating frontend .env.local file..."
|
echo "Creating frontend .env.local file..."
|
||||||
cd frontend
|
cd frontend
|
||||||
# The BACKEND_URL is not needed because Traefik will handle routing /api
|
# 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_GITHUB_URL=${{ vars.NEXT_PUBLIC_GITHUB_URL }}" >> .env.local
|
||||||
echo "NEXT_PUBLIC_LINKEDIN_URL=${{ vars.NEXT_PUBLIC_LINKEDIN_URL }}" >> .env
|
echo "NEXT_PUBLIC_LINKEDIN_URL=${{ vars.NEXT_PUBLIC_LINKEDIN_URL }}" >> .env.local
|
||||||
|
|
||||||
- name: Cache Node Modules and Next.js Build
|
- name: Cache Dependencies and Build Artifacts
|
||||||
# Caching node_modules and Next.js build cache to speed up subsequent builds
|
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.npm
|
backend/node_modules
|
||||||
${{ gitea.workspace }}/.next/cache
|
frontend/node_modules
|
||||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
|
frontend/.next/cache
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
- name: Install Dependencies and Build
|
- name: Install Dependencies and Build
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user