Skip to content

feat(ci): run build in pr #2

feat(ci): run build in pr

feat(ci): run build in pr #2

Workflow file for this run

name: Pull Request Checks
on:
pull_request:
branches:
- dev
- main
jobs:
build:
name: Run Build in Pull Request Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Check for lock files
id: check-lock
run: |
if [ -f "pnpm-lock.yaml" ]; then
echo "lock_file_exists=true" >> $GITHUB_OUTPUT
else
echo "lock_file_exists=false" >> $GITHUB_OUTPUT
fi
- name: Install dependencies with pnpm
if: steps.check-lock.outputs.lock_file_exists == 'true'
run: pnpm install --frozen-lockfile
- name: Install dependencies without lockfile
if: steps.check-lock.outputs.lock_file_exists == 'false'
run: pnpm install
- name: Lint
run: pnpm lint
- name: Build Next.js app
run: pnpm build
- name: Check build status
run: |
echo "✅ Next.js build completed successfully!"
echo "The application can be built without errors."