-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
53 lines (44 loc) Β· 1.42 KB
/
deploy.sh
File metadata and controls
53 lines (44 loc) Β· 1.42 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
#!/bin/bash
# NASA Weather Explorer Deployment Script
echo "π°οΈ NASA Weather Explorer - Deployment Script"
echo "=============================================="
# Check if .env file exists
if [ ! -f .env ]; then
echo "β Error: .env file not found!"
echo "Please copy .env.example to .env and fill in your Supabase credentials"
exit 1
fi
# Check if Supabase CLI is installed
if ! command -v supabase &> /dev/null; then
echo "π¦ Installing Supabase CLI..."
npm install -g supabase
fi
# Install dependencies
echo "π¦ Installing dependencies..."
npm install
# Build the project
echo "π¨ Building the project..."
npm run build
# Check if supabase is linked
if [ ! -f .supabase/config.toml ]; then
echo "π Please link your Supabase project:"
echo "supabase link --project-ref your-project-ref"
echo ""
echo "Then run this script again."
exit 1
fi
# Push database migrations
echo "ποΈ Pushing database migrations..."
supabase db push
# Deploy edge functions
echo "β‘ Deploying edge functions..."
supabase functions deploy get-nasa-weather
echo ""
echo "β
Deployment completed successfully!"
echo ""
echo "Next steps:"
echo "1. Deploy the 'dist' folder to your hosting service (Vercel, Netlify, etc.)"
echo "2. Make sure your domain is added to Supabase allowed origins"
echo "3. Test the application with a few locations"
echo ""
echo "π Your NASA Weather Explorer is ready to launch!"