🔒 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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user