diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index ed74736..3699512 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -48,11 +48,20 @@ jobs: echo "Unable to determine package manager" exit 1 fi - - name: Setup Node + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false + + - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: "20" - cache: ${{ steps.detect-package-manager.outputs.manager }} + node-version: 20 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install - name: Setup Pages uses: actions/configure-pages@v5 with: @@ -61,18 +70,6 @@ jobs: # # You may remove this line if you want to manage the configuration yourself. static_site_generator: next - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - .next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next build - name: Upload artifact