Skip to content

Instantly share code, notes, and snippets.

@seabbs
Last active September 10, 2020 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seabbs/e4fea75701cb30b02f253de4759397f9 to your computer and use it in GitHub Desktop.
Save seabbs/e4fea75701cb30b02f253de4759397f9 to your computer and use it in GitHub Desktop.
#!bin/bash
cd /home/azureuser/
git clone git@github.com:epiforecasts/covid-rt-estimates.git
cd covid-rt-estimates
sudo bash bin/update-docker.sh "build"
sudo bash bin/update-via-docker.sh
FILE=last-update/update-complete
while [ ! -f "$FILE" ]; do
echo "$FILE does not exist so keep waiting."
sleep 60
done
echo "$FILE exists so updating GitHub and removing local estimates"
git add --all
git commit -m "update estimates"
git push
rm -r -f covid-rt-estimates
@seabbs
Copy link
Author

seabbs commented Sep 9, 2020

Add following to crontab using crontab -e to update every day at 7pm:

0 19 * * * /bin/bash /home/azureuser/update-site.sh >/dev/null 2>&1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment