From f5c0ae570eaf7e311701eb4aad3d40dc8f32306f Mon Sep 17 00:00:00 2001 From: Nick Clyde Date: Wed, 4 Sep 2024 10:40:34 -0700 Subject: [PATCH] Stop service before copying new binary --- .github/workflows/deployment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index 8c587e5..9cbb974 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -63,6 +63,7 @@ jobs: env: AZURE_VM_IP: ${{ secrets.AZURE_VM_IP }} run: | + ssh azureuser@${AZURE_VM_IP} "sudo systemctl stop phinvads-go" scp -o StrictHostKeyChecking=accept-new ./phinvads-go azureuser@${AZURE_VM_IP}:/home/azureuser/phinvads-go scp ./remote/production/phinvads-go.service azureuser@${AZURE_VM_IP}:/home/azureuser/phinvads-go.service ssh azureuser@${AZURE_VM_IP} "sudo mv phinvads-go.service /etc/systemd/system/phinvads-go.service && sudo systemctl enable phinvads-go && sudo systemctl restart phinvads-go"