24 lines
535 B
Bash
Executable file
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/"
|