-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
30 lines (24 loc) · 835 Bytes
/
Copy pathdeploy.sh
File metadata and controls
30 lines (24 loc) · 835 Bytes
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
#!/bin/bash
# ============================================================
# Moni's Munchies — VPS Deploy Script
# Place this file on your SERVER at /var/www/monismunchies/
# Run it on the server after pushing changes to GitHub:
#
# ssh root@YOUR_VPS_IP
# cd /var/www/monismunchies
# bash deploy.sh
# ============================================================
set -e # Stop if any command fails
echo ""
echo "🍪 Moni's Munchies — Deploying..."
echo "=================================="
# Pull latest changes from GitHub
git pull origin master
# Fix permissions (in case new files were added)
chown -R www-data:www-data /var/www/monismunchies
chmod -R 755 /var/www/monismunchies
# Reload Nginx (no downtime)
systemctl reload nginx
echo ""
echo "✅ Deploy complete! Live at https://monismunchies.com"
echo ""