diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 5f57f972..ecae0b45 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -28,14 +28,31 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18' - cache: 'npm' - cache-dependency-path: './frontend/package-lock.json' + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + 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: npm ci + run: pnpm install --frozen-lockfile - name: Build frontend - run: npm run build + run: pnpm build - name: Cache build artifacts uses: actions/cache@v3 @@ -43,6 +60,6 @@ jobs: path: | ./frontend/.next ./frontend/node_modules - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ github.sha }} + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- \ No newline at end of file + ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- \ No newline at end of file