add cache

This commit is contained in:
2025-04-24 21:44:22 +08:00
parent b36435a9fd
commit 43c7a033ca

View File

@@ -20,9 +20,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn' # 自动缓存 yarn 依赖
- name: Install Yarn
run: npm install -g yarn
- name: Cache Next.js build
uses: actions/cache@v3
id: cache-next-build
with:
path: |
.next/cache
key: ${{ runner.os }}-next-${{ github.sha }}
restore-keys: |
${{ runner.os }}-next-
- name: Install dependencies with Yarn
run: yarn install --frozen-lockfile