2021-12-14 14:02:19 +08:00
|
|
|
#!/bin/sh
|
2021-12-17 11:41:14 +08:00
|
|
|
. /home/ubuntu/.bashrc
|
|
|
|
export PATH="/usr/local/bin:/usr/bin:/bin"
|
2021-12-14 14:02:19 +08:00
|
|
|
|
2021-12-17 07:16:41 +08:00
|
|
|
git pull > /tmp/git_changes.txt
|
2021-12-14 14:02:19 +08:00
|
|
|
|
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
|
2021-12-14 14:02:19 +08:00
|
|
|
docker-compose build
|
2021-12-17 07:08:27 +08:00
|
|
|
docker-compose up -d
|
2021-12-14 14:02:19 +08:00
|
|
|
fi
|