From 38b525a1b633e6aa38803b95f24dd797fe89dc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 24 Feb 2026 17:56:49 +0400 Subject: [PATCH] Fix pnpm cache (hopefully) --- .gitea/workflows/ci.yaml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 1db1a39..fdb6315 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -3,6 +3,7 @@ name: CI on: push: branches: + - main - master pull_request: {} @@ -25,7 +26,20 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Lint @@ -45,7 +59,20 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Run Tests