gradio/website/reload_website.sh
Ali Abdalla 7b44734b9e
export latest commit variable (#2645)
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-11-14 16:17:33 -05:00

16 lines
336 B
Bash

#!/bin/bash
set -e
. /home/ubuntu/.bashrc
export PATH="/usr/local/bin:/usr/bin:/bin"
git pull > /tmp/git_changes.txt
if grep -q "Already up to date." /tmp/git_changes.txt; then
echo "NO CHANGES"
else
echo "Reloading..."
export LATEST_COMMIT=$(git log -1 --format="%H")
docker-compose build
docker-compose up -d
fi