From 068f953d8d732c8d085618aab8a581e42b3a050e Mon Sep 17 00:00:00 2001 From: Sebastian Fastner Date: Wed, 24 Jul 2024 01:14:13 +0200 Subject: [PATCH] feat: Cache pnpm store for prod deployment pipeline --- .../workflows/github-actions-prod-deployment.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-prod-deployment.yml b/.github/workflows/github-actions-prod-deployment.yml index bca01de..b3187a6 100644 --- a/.github/workflows/github-actions-prod-deployment.yml +++ b/.github/workflows/github-actions-prod-deployment.yml @@ -18,7 +18,21 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 - cache: 'pnpm' - run: corepack enable + - run: pnpm store path + id: store-path + - name: Cache pnpm modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-pnpm-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ${{ join(steps.store-path.outputs.*, '') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - run: pnpm i - run: pnpm deploy:prod