add cache
This commit is contained in:
11
.github/workflows/deploy.yml
vendored
11
.github/workflows/deploy.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user