-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-github-secrets.sh
More file actions
executable file
·57 lines (48 loc) · 2.01 KB
/
Copy pathsetup-github-secrets.sh
File metadata and controls
executable file
·57 lines (48 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# 🚀 Script para configurar GitHub Secrets automáticamente
# Ejecutar: chmod +x setup-github-secrets.sh && ./setup-github-secrets.sh
echo "🔐 Configurando GitHub Secrets para Mandalas..."
# Variables extraídas de .env.local
# No guardes secretos reales en este archivo. Usa GitHub CLI con valores de entorno:
# gh secret set RESEND_API_KEY --body "$RESEND_API_KEY"
SUPABASE_URL="${SUPABASE_URL:-https://your-project.supabase.co}"
SUPABASE_ANON_KEY="${SUPABASE_ANON_KEY:-your-supabase-anon-key}"
RESEND_API_KEY="${RESEND_API_KEY:-your-resend-api-key}"
# Variables de Vercel
VERCEL_ORG_ID="team_eBliS0vkDcxbdpVnwaiQB2OO"
VERCEL_PROJECT_ID="prj_c7gk9h1FRmXJpGepL5zsm0k7Nf5i"
# URLs del proyecto
PRODUCTION_URL="https://mandalashostels.com"
STAGING_URL="https://mandalas-sigma.vercel.app"
echo "📋 Secrets a configurar:"
echo "1. VERCEL_ORG_ID: $VERCEL_ORG_ID"
echo "2. VERCEL_PROJECT_ID: $VERCEL_PROJECT_ID"
echo "3. PRODUCTION_URL: $PRODUCTION_URL"
echo "4. STAGING_URL: $STAGING_URL"
echo "5. SUPABASE_URL: $SUPABASE_URL"
echo "6. SUPABASE_ANON_KEY: $SUPABASE_ANON_KEY"
echo "7. RESEND_API_KEY: $RESEND_API_KEY"
echo ""
echo "⚠️ Necesitas obtener VERCEL_TOKEN manualmente desde:"
echo " https://vercel.com/account/tokens"
echo ""
# Instrucciones para configurar manualmente
echo "🔗 Configuración manual en GitHub:"
echo "1. Ve a: https://github.com/pascal1010100/mandalas/settings/secrets/actions"
echo "2. Click 'New repository secret'"
echo "3. Agrega cada uno de estos secrets:"
echo ""
cat << 'EOF'
VERCEL_ORG_ID=team_eBliS0vkDcxbdpVnwaiQB2OO
VERCEL_PROJECT_ID=prj_c7gk9h1FRmXJpGepL5zsm0k7Nf5i
PRODUCTION_URL=https://mandalashostels.com
STAGING_URL=https://mandalas-sigma.vercel.app
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-supabase-anon-key
RESEND_API_KEY=your-resend-api-key
VERCEL_TOKEN=obtener_desde_vercel_dashboard
EOF
echo ""
echo "✅ Una vez configurados, prueba con:"
echo " git checkout develop && git push origin develop"
echo " git checkout main && git push origin main"