forked from BLC/AyposWeb
25 lines
720 B
Bash
25 lines
720 B
Bash
#!/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"
|