From e4e51b69a1aa403828d03bca20765a90247f5fb7 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 31 Dec 2023 03:08:56 +0800 Subject: [PATCH] CI: save cache on each run --- .github/workflows/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48393948..c4c10d40 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,8 +21,12 @@ jobs: - name: Cache cache.db uses: actions/cache@v3 with: - path: .cache - key: ${{ runner.os }}-v1 + path: | + .cache + key: ${{ runner.os }}-v1-${{ github.sha }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-v1 - run: bun install - run: bun run build - name: Deploy