From 43c7a033ca3e6b7aa20730104c22013a0609c7a5 Mon Sep 17 00:00:00 2001 From: lostecho Date: Thu, 24 Apr 2025 21:44:22 +0800 Subject: [PATCH] add cache --- .github/workflows/deploy.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4dad0c1..e5fb6a6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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