update pipeline

This commit is contained in:
oleg.vodyanov91@gmail.com 2026-01-27 00:20:41 +04:00
parent 96293cb066
commit 8567a045d9

View File

@ -12,6 +12,16 @@ pipeline {
set -euo pipefail
cd ~/docbot || exit 1
git diff --name-only origin/main main | grep -i 'alembic/versions' > db_script.txt || true
if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then
git checkout main
fi
if git pull origin main | grep -q "Already up to date."; then
echo "No updates to deploy."
exit 0
fi
git pull origin main
. .venv/bin/activate
if [ -s db_script.txt ]; then