updates
This commit is contained in:
parent
10a1cf9cfb
commit
18d210aae8
1 changed files with 21 additions and 0 deletions
21
update-site.sh
Normal file
21
update-site.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd /home/prodesk/webpage
|
||||||
|
|
||||||
|
git fetch origin main
|
||||||
|
|
||||||
|
LOCAL=$(git rev-parse HEAD)
|
||||||
|
REMOTE=$(git rev-parse origin/main)
|
||||||
|
|
||||||
|
if [ "$LOCAL" != "$REMOTE" ]; then
|
||||||
|
echo "$(date): Updates found, pulling..."
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
echo "$(date): Restarting docker container..."
|
||||||
|
docker restart 9c84412e722e
|
||||||
|
|
||||||
|
echo "$(date): Update complete."
|
||||||
|
else
|
||||||
|
echo "$(date): No updates."
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue