Skip to content

Commit

Permalink
ci: adapt ci to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
mateobelanger authored Nov 25, 2024
1 parent 7c53a36 commit 7ded66c
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 7ded66c

Please sign in to comment.