#!/bin/bash cd /app/project || exit echo "Updating repository..." git pull origin main echo "Installing dependencies..." npm install echo "Building latest version..." npm run build rm -rf /var/www/html/* # Vite if [ -d "dist" ]; then cp -r dist/* /var/www/html/ fi # CRA if [ -d "build" ]; then cp -r build/* /var/www/html/ fi echo "Deployment updated at $(date)"