update pipeline

This commit is contained in:
oleg.vodyanov91@gmail.com 2026-01-26 23:50:22 +04:00
parent c9390b4c00
commit 5d77b2eb05

View File

@ -11,8 +11,15 @@ pipeline {
ssh -o StrictHostKeyChecking=no kreamond@109.73.204.66 '
set -euo pipefail
cd ~/docbot || exit 1
git diff --name-only origin/main main | grep -i 'src/alembic/version' > db_script.txt || true
git pull origin main
./new_version.sh
if [ -s db_script.txt ]; then
echo "Database migration scripts detected. Running migrations..."
alembic upgrade head
else
echo "No database migration scripts detected."
fi
sudo ./new_version.sh
'
'''
}