ci(workflows): improve caching and optimize dependency installation

Add Next.js build cache to deployment workflow for improved performance. Update all workflows to use `pnpm install --frozen-lockfile --prefer-offline` for faster and more reliable dependency management.
This commit is contained in:
Mathis HERRIOT
2026-01-15 00:39:56 +01:00
parent 7048c2731e
commit f79507730e
3 changed files with 14 additions and 3 deletions

View File

@@ -40,8 +40,19 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Cache Next.js build
if: matrix.component != 'backend'
uses: actions/cache@v4
with:
path: ${{ matrix.component }}/.next/cache
# Clé basée sur le lockfile et les fichiers source du composant
key: ${{ runner.os }}-nextjs-${{ matrix.component }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles(concat(matrix.component, '/**/*.[jt]s'), concat(matrix.component, '/**/*.[jt]sx')) }}
restore-keys: |
${{ runner.os }}-nextjs-${{ matrix.component }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-nextjs-${{ matrix.component }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --prefer-offline
- name: Lint ${{ matrix.component }}
run: pnpm -F @memegoat/${{ matrix.component }} lint