lusa-back-planner/deploy.sh
Vadym Samoilenko 19dc7942c2 Restore executable bit on deploy.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 11:55:15 +00:00

24 lines
535 B
Bash
Executable file

#!/bin/bash
set -e
REPO_DIR="/opt/lusa-back-planner"
WEB_DIR="/var/www/html/lusa-Back-Planner"
echo "==> Pulling latest changes..."
cd "$REPO_DIR"
git pull
echo "==> Installing dependencies..."
npm install
echo "==> Clearing build cache..."
rm -rf dist node_modules/.vite
echo "==> Building (redirect URI: $(grep REDIRECT_URI .env | cut -d= -f2))..."
npm run build
echo "==> Deploying to $WEB_DIR..."
sudo mkdir -p "$WEB_DIR"
sudo cp -r dist/. "$WEB_DIR/"
echo "==> Done! https://ai-sandbox.oliver.solutions/lusa-Back-Planner/"