🔒 Add Pre-Push Hook & Fix GitHub Actions

 Pre-Push Hook System:
- Created scripts/pre-push.sh with comprehensive checks
- Added Git pre-push hook (.git/hooks/pre-push)
- Added npm run pre-push script
- Added npm run lint:fix script

🔧 Pre-Push Checks:
- Dependencies installation (npm ci)
- ESLint validation (npm run lint)
- Test execution (npm run test)
- Build verification (npm run build)
- Security audit (npm audit)
- TypeScript type check (tsc --noEmit)

 GitHub Actions Fix:
- Removed deprecated GHOST_API variables
- Updated environment variables to match current .env
- Fixed test and production environment setup

🎯 Benefits:
- No more failed pushes to GitHub
- All checks run locally before push
- Same checks as GitHub Actions
- Prevents broken code from reaching remote
This commit is contained in:
Dennis Konkol
2025-09-05 23:09:04 +00:00
parent 604c5077d9
commit 62ef4deb4f
3 changed files with 122 additions and 4 deletions

View File

@@ -7,6 +7,8 @@
"build": "next build",
"start": "next start",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"pre-push": "./scripts/pre-push.sh",
"buildAnalyze": "cross-env ANALYZE=true next build",
"test": "jest",
"test:watch": "jest --watch",