gradio/website/reload_website.sh

16 lines
329 B
Bash
Raw Normal View History

#!/bin/bash
set -e
2021-12-17 11:41:14 +08:00
. /home/ubuntu/.bashrc
export PATH="/usr/local/bin:/usr/bin:/bin"
2021-12-17 07:16:41 +08:00
git pull > /tmp/git_changes.txt
2022-11-08 20:21:31 +08:00
if grep -q "Already up to date." /tmp/git_changes.txt; then
echo "NO CHANGES"
2021-12-17 07:16:41 +08:00
else
echo "Reloading..."
LATEST_COMMIT=$(git log -1 --format="%H")
docker-compose build
2021-12-17 07:08:27 +08:00
docker-compose up -d
fi