- Add test-build.js script to verify standalone build locally - Add pre-commit hook with security, build, and test checks - Copy required-server-files.json to root of standalone for Amplify - Add husky for automatic pre-commit validation This ensures we test builds locally before pushing
22 lines
558 B
YAML
22 lines
558 B
YAML
version: 1
|
|
frontend:
|
|
phases:
|
|
preBuild:
|
|
commands:
|
|
- npm ci
|
|
- npm run security:check
|
|
# Print env vars for debugging (without exposing values)
|
|
- env | grep CONFLUENCE | sed 's/=.*/=***/'
|
|
build:
|
|
commands:
|
|
- npm run build
|
|
- cp -r .next/static .next/standalone/.next/
|
|
- cp .next/standalone/.next/required-server-files.json .next/standalone/
|
|
artifacts:
|
|
baseDirectory: .next/standalone
|
|
files:
|
|
- '**/*'
|
|
cache:
|
|
paths:
|
|
- node_modules/**/*
|
|
- .next/cache/**/* |