serial deployment
parent
fb3711e58f
commit
e38d52fedd
|
@ -25,4 +25,4 @@ jobs:
|
|||
chmod 644 ~/.ssh/known_hosts
|
||||
ssh-keyscan pandorabox.io >> ~/.ssh/known_hosts
|
||||
# execute deployment script
|
||||
cat scripts/deploy.sh | ssh root@pandorabox.io "cd /data/pandorabox.io && /bin/sh -"
|
||||
cat scripts/deploy.sh | ssh root@pandorabox.io "cd /data/pandorabox.io && /bin/bash -"
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#!/bin/sh
|
||||
# deployment script for automated updates via github actions
|
||||
|
||||
# ensure exclusive execution with flock
|
||||
LOCK_FILE=/tmp/pandorabox-deployment.lock
|
||||
exec 200>"$LOCK_FILE"
|
||||
flock -n 200 || exit
|
||||
|
||||
# get latest repo version
|
||||
git pull
|
||||
|
||||
|
|
Loading…
Reference in New Issue