This commit is contained in:
Server
2025-07-15 03:35:15 +00:00
parent f3610a70d4
commit 7c70e03d5e
6 changed files with 380 additions and 327 deletions

24
deploy.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
APP_DIR="/home/ubuntu/AyposWeb"
# Navigate to your app directory
cd "$APP_DIR" || { echo "Failed to cd to $APP_DIR"; exit 1; }
# Pull latest changes from Gitea
echo "Pulling latest code..."
git pull origin main || { echo "Git pull failed"; exit 1; }
# Build your app (change this to your build command)
# For example, npm build:
echo "Installing dependencies..."
npm install || { echo "npm install failed"; exit 1; }
echo "Building app..."
npm run build || { echo "npm build failed"; exit 1; }
# Restart your app (change this to your app's restart command)
# For example, systemctl restart myapp.service:
systemctl reload nginx || { echo "Failed to reload nginx"; exit 1; }
echo "Deployment complete"