From 082b895982a462d8eea999541f1d014abfe5be6d Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Sun, 25 Jan 2026 14:19:47 -0600 Subject: [PATCH] perf(ci): add pnpm caching to storybook workflow - Setup pnpm before setup-node so caching can detect it - Enable node cache for pnpm in setup-node action - Add explicit pnpm store caching with actions/cache@v4 - Key based on pnpm-lock.yaml hash for cache invalidation This should dramatically speed up subsequent builds by reusing the pnpm store instead of downloading 2563 packages each time. --- .gitea/workflows/deploy-storybook.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-storybook.yml b/.gitea/workflows/deploy-storybook.yml index deb89e21..bcccc0b6 100644 --- a/.gitea/workflows/deploy-storybook.yml +++ b/.gitea/workflows/deploy-storybook.yml @@ -22,13 +22,26 @@ jobs: with: fetch-depth: 0 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20" + cache: 'pnpm' - - name: Setup pnpm - uses: pnpm/action-setup@v4 + - name: Get pnpm store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + pnpm-store- - name: Install dependencies run: pnpm install --frozen-lockfile