Skip to content

Using pnpm in CI/CD

Using pnpm in CI/CD #9

Workflow file for this run

# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Build Next.js site
on:
pull_request:
types: [opened, reopened]
# Runs on pushes targeting the default branch
push:
branches: ['develop', 'feature/*', 'bugfix/*', 'techdebt/*']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'nextjs'
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: pnpm-setup
uses: pnpm/action-setup@v2
- run: pnpm run build