diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0ddd927..32b8ddb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -203,15 +203,26 @@ jobs: path: open-api merge-multiple: true - - name: Enable pnpm with corepack - run: corepack enable pnpm - - name: Use Node.js 22.x uses: actions/setup-node@v6 with: node-version: 22.x - cache: 'pnpm' - cache-dependency-path: ui/menu-website/pnpm-lock.yaml + + - name: Enable pnpm with corepack + run: corepack enable pnpm + + - name: Get pnpm store directory + id: pnpm-cache + run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + working-directory: ./ui/menu-website + + - name: Cache pnpm store + uses: actions/cache@v5 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('ui/menu-website/pnpm-lock.yaml', 'ui/menu-website/package.json') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install frontend dependencies run: pnpm install --frozen-lockfile