PPT-Springboot / update.sh
shashidharak99's picture
Update update.sh
be9e41e verified
raw
history blame contribute delete
382 Bytes
#!/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)"