-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.forge-deploy
More file actions
executable file
·39 lines (29 loc) · 1.01 KB
/
.forge-deploy
File metadata and controls
executable file
·39 lines (29 loc) · 1.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
#!/usr/bin/env bash
set -e
echo "🚀 Deployment started..."
# Navigate to site directory (Laravel Cloud auto-handles this)
cd $FORGE_SITE_PATH
# Pull latest code (Laravel Cloud does this automatically)
echo "📦 Installing dependencies..."
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
# Run database migrations
echo "🗄️ Running migrations..."
php artisan migrate --force
# ✨ Ensure permissions system is ready
echo "🔍 Ensuring permissions system integrity..."
php artisan permissions:ensure --sync
# Clear and cache configuration
echo "🗂️ Caching configuration..."
php artisan config:cache
php artisan route:cache
php artisan view:cache
# Clear application cache
echo "🧹 Clearing application cache..."
php artisan cache:clear
# Restart queue workers (if using queues)
echo "♻️ Restarting queue workers..."
php artisan queue:restart
# Optimize for production
echo "⚡ Optimizing for production..."
php artisan optimize
echo "✅ Deployment finished successfully!"