- Auto-merge workflow for PRs with automerge label - Dependabot auto-merge for patch/minor updates - Weekly dependency updates via Dependabot 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Next.js Application
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build application
|
|
run: npm run build
|
|
env:
|
|
NODE_ENV: production
|
|
|
|
- name: Check build output
|
|
run: |
|
|
if [ -d ".next" ]; then
|
|
echo "Build successful - .next directory created"
|
|
ls -la .next
|
|
else
|
|
echo "Build failed - .next directory not found"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Archive build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-output
|
|
path: |
|
|
.next/
|
|
!.next/cache/
|
|
retention-days: 7
|
|
|
|
- name: Check standalone output
|
|
run: |
|
|
if [ -d ".next/standalone" ]; then
|
|
echo "Standalone build created successfully"
|
|
ls -la .next/standalone
|
|
else
|
|
echo "Warning: Standalone build not found (may need output: 'standalone' in next.config.mjs)"
|
|
fi
|
|
continue-on-error: true
|