← Back to list

deployment-devops
by Smarter-Poker
Smarter-Poker-World-Hub
⭐ 0🍴 0📅 Jan 26, 2026
SKILL.md
name: Deployment & DevOps description: Deploy to production with Vercel and manage environment
Deployment & DevOps Skill
Overview
Deploy the Smarter.Poker platform to production using Vercel and manage the environment.
Auto-Publish Workflow
Steps (Mandatory after code changes)
# 1. Build
npm run build
# 2. Commit
git add -A && git commit -m "[description]"
# 3. Push
git push origin main
# 4. Deploy
vercel --prod
# 5. Verify
curl -s "https://smarter.poker/" | grep -o "buildId[^,]*"
Environment Variables
Required in Vercel
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
OPENAI_API_KEY=sk-...
Local (.env.local)
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
OPENAI_API_KEY=sk-...
Domain Configuration
Production
- Primary:
smarter.poker - Redirect:
www.smarter.poker→smarter.poker
Middleware (middleware.js)
export function middleware(request) {
const host = request.headers.get('host') || '';
// Redirect www to non-www
if (host.startsWith('www.')) {
return NextResponse.redirect(
new URL(request.url.replace('www.', ''))
);
}
return NextResponse.next();
}
Cron Jobs (Vercel)
Configure in vercel.json
{
"crons": [
{
"path": "/api/cron/horses-clips",
"schedule": "0 * * * *"
},
{
"path": "/api/cron/horses-news",
"schedule": "0 8,20 * * *"
},
{
"path": "/api/cron/horses-memes",
"schedule": "0 6,14,22 * * *"
}
]
}
Build Optimization
next.config.js
module.exports = {
reactStrictMode: false, // Required for Supabase auth
images: {
domains: ['xxx.supabase.co'],
unoptimized: false
},
experimental: {
optimizeCss: true
}
};
Monitoring
Check Build Status
vercel ls
View Logs
vercel logs smarter.poker --follow
Rollback
vercel rollback
Troubleshooting
Build Fails
- Check
npm run buildlocally first - Review Vercel build logs
- Check for missing env vars
404 on Routes
- Ensure pages exist in
/pages/ - Check for dynamic route issues
API Timeout
- Vercel serverless has 10s limit (free), 60s (pro)
- Move long operations to background jobs
Cache Issues
- Redeploy:
vercel --prod --force - Purge CDN cache in Vercel dashboard
- Test in incognito/hard refresh
Security Checklist
- No secrets in client-side code
- Service role key only in API routes
- RLS enabled on all tables
- CORS configured properly
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon