diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4d95f7e7..868a91a7 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -41,6 +41,20 @@ jobs: - name: Setup pnpm config 🏗 run: pnpm config set store-dir $PNPM_CACHE_FOLDER + - name: Get pnpm store directory 🏬 + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache 🧃 + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install dependencies 👨🏻‍💻 run: pnpm install