gradio/website/reload_website.sh

16 lines
404 B
Bash
Raw Normal View History

#!/bin/sh
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
2021-12-17 07:16:41 +08:00
if grep -q "Already up to date." /tmp/git_changes.txt; then
echo "Already up to date. No reload."
else
echo "Reloading..."
if grep -q "demo/" /tmp/git_changes.txt; then
2021-12-17 07:08:27 +08:00
cd upload_notebooks && python run.py && cd ..
fi
docker-compose build
2021-12-17 07:08:27 +08:00
docker-compose up -d
fi