This commit is contained in:
parent
4375c4d125
commit
3b362aeac0
2 changed files with 7 additions and 7 deletions
|
@ -21,7 +21,7 @@ steps:
|
||||||
- echo "SETTING UP SSH"
|
- echo "SETTING UP SSH"
|
||||||
- apk add openssh-client
|
- apk add openssh-client
|
||||||
- mkdir -p $HOME/.ssh
|
- mkdir -p $HOME/.ssh
|
||||||
- ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts
|
- ssh-keyscan -t ed25519 oxaliq.net >> $HOME/.ssh/known_hosts
|
||||||
- echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
|
- echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
|
||||||
- chmod 0600 $HOME/.ssh/id_ed25519
|
- chmod 0600 $HOME/.ssh/id_ed25519
|
||||||
- echo "SSH SETUP DONE"
|
- echo "SSH SETUP DONE"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# hello variables
|
# hello variables
|
||||||
host=deploy@turtle.hup.is
|
host=root@oxaliq.net
|
||||||
|
|
||||||
# organize the files
|
# organize the files
|
||||||
echo "ORGANIZING THE FILES NICELY"
|
echo "ORGANIZING THE FILES NICELY"
|
||||||
|
@ -34,15 +34,15 @@ scp -r oxaliq "$host":~/
|
||||||
# TODO make this not remove the old-working version until
|
# TODO make this not remove the old-working version until
|
||||||
# the new version is confirmed working
|
# the new version is confirmed working
|
||||||
echo "SETTING OWNERSHIP AND PERMISSIONS"
|
echo "SETTING OWNERSHIP AND PERMISSIONS"
|
||||||
ssh $host 'sudo chown -R oxaliqdotnet:oxaliqdotnet oxaliq/'
|
ssh $host 'chown -R oxaliqdotnet:oxaliqdotnet oxaliq/'
|
||||||
ssh $host 'sudo chmod -R 755 oxaliq/'
|
ssh $host 'chmod -R 755 oxaliq/'
|
||||||
|
|
||||||
echo "REPLACING PREVIOUS DEPLOYMENT"
|
echo "REPLACING PREVIOUS DEPLOYMENT"
|
||||||
ssh $host 'sudo rm -rf /srv/oxaliq || true'
|
ssh $host 'rm -rf /srv/oxaliq || true'
|
||||||
ssh $host 'sudo mv oxaliq /srv/.'
|
ssh $host 'mv oxaliq /srv/.'
|
||||||
|
|
||||||
echo "RESTARTING SERVICE"
|
echo "RESTARTING SERVICE"
|
||||||
ssh $host 'sudo systemctl restart oxaliqdotnet.service'
|
ssh $host 'systemctl restart oxaliqdotnet.service'
|
||||||
|
|
||||||
echo "SUCCESS!"
|
echo "SUCCESS!"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue