From 4d6de514a52386bed2c4e69fb04d429e0eb17f58 Mon Sep 17 00:00:00 2001 From: oxaliq Date: Tue, 16 Apr 2024 20:40:53 -0400 Subject: [PATCH] point ci scripts to the farm --- .woodpecker/build-and-deploy.yml | 4 ++-- .woodpecker/deploy.sh | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.woodpecker/build-and-deploy.yml b/.woodpecker/build-and-deploy.yml index 1d0f333..6cda853 100644 --- a/.woodpecker/build-and-deploy.yml +++ b/.woodpecker/build-and-deploy.yml @@ -21,8 +21,8 @@ steps: - echo "SETTING UP SSH" - apk add openssh-client - mkdir -p $HOME/.ssh - - ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts - - echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519 + - ssh-keyscan -t ed25519 oxaliq.net >> $HOME/.ssh/known_hosts + - echo "$oxaliq_deploy_ssh" > $HOME/.ssh/id_ed25519 - chmod 0600 $HOME/.ssh/id_ed25519 - echo "SSH SETUP DONE" - echo "RUNNING DEPLOY SCRIPT" diff --git a/.woodpecker/deploy.sh b/.woodpecker/deploy.sh index 4a4e161..9e9b154 100755 --- a/.woodpecker/deploy.sh +++ b/.woodpecker/deploy.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # hello variables -host=deploy@turtle.hup.is +host=root@oxaliq.net # organize the files echo "ORGANIZING THE FILES NICELY" @@ -34,15 +34,15 @@ scp -r oxaliq "$host":~/ # TODO make this not remove the old-working version until # the new version is confirmed working echo "SETTING OWNERSHIP AND PERMISSIONS" -ssh $host 'sudo chown -R oxaliqdotnet:oxaliqdotnet oxaliq/' -ssh $host 'sudo chmod -R 755 oxaliq/' +ssh $host 'chown -R oxaliqdotnet:oxaliqdotnet oxaliq/' +ssh $host 'chmod -R 755 oxaliq/' echo "REPLACING PREVIOUS DEPLOYMENT" -ssh $host 'sudo rm -rf /srv/oxaliq || true' -ssh $host 'sudo mv oxaliq /srv/.' +ssh $host 'rm -rf /srv/oxaliq || true' +ssh $host 'mv oxaliq /srv/.' echo "RESTARTING SERVICE" -ssh $host 'sudo systemctl restart oxaliqdotnet.service' +ssh $host 'systemctl restart oxaliqdotnet.service' echo "SUCCESS!" exit 0