-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·55 lines (44 loc) · 1.22 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
·55 lines (44 loc) · 1.22 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
#!/bin/bash
# Pluggist Deployment Script
# Deploy to Cloudflare Workers with GitHub integration
set -e
echo "🚀 Starting Pluggist deployment..."
# Check if we're in the right directory
if [ ! -f "package.json" ]; then
echo "❌ Error: package.json not found. Are you in the project root?"
exit 1
fi
# Install dependencies
echo "📦 Installing dependencies..."
npm install
# Install MCP server dependencies
echo "🤖 Setting up MCP server..."
if [ -d "mcp-server" ]; then
cd mcp-server
npm install
cd ..
fi
# Build the Next.js app
echo "🔨 Building Next.js application..."
npm run build
# Build for Cloudflare Workers
echo "☁️ Building for Cloudflare Workers..."
npm run build:worker
# Deploy to Cloudflare
echo "🚢 Deploying to Cloudflare..."
if [ "$1" == "preview" ]; then
echo "Deploying to preview environment..."
wrangler deploy --env preview
else
echo "Deploying to production..."
wrangler deploy
fi
echo "✅ Deployment complete!"
# Show deployment URL
echo ""
echo "🌐 Your app is now live!"
echo "Production: https://pluggist.com"
echo "Workers: https://pluggist.workers.dev"
echo ""
echo "📊 View analytics: https://dash.cloudflare.com"
echo "🔧 Manage workers: wrangler tail"