From ed3b0f412c3549eeea6c6dc17bf08eb5c5ca54ae Mon Sep 17 00:00:00 2001 From: Teages Date: Mon, 27 Nov 2023 10:04:17 +0800 Subject: [PATCH] fix(action): pnpm not found --- .github/workflows/docker.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4832aee69..7b4cdec08 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -26,17 +26,27 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Cache node_modules - uses: actions/cache@v3 - id: cached-node_modules + - uses: pnpm/action-setup@v2 + name: Install pnpm with: - path: | - node_modules - key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} + version: 8 + run_install: false - - name: Install Dependencies - if: steps.cached-node_modules.outputs.cache-hit != 'true' - run: pnpm install --frozen-lockfile + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + 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 - name: Build Nuxt App run: pnpm build