From 0f1b4a56c55f785458f7d25cab42e72099bc22ab Mon Sep 17 00:00:00 2001 From: gaskar Date: Sun, 7 Jan 2024 16:07:29 +0400 Subject: [PATCH] fixing actions --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e84dd06..1c6c165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,19 +13,21 @@ jobs: uses: actions/checkout@v2 - name: SSH and Deploy to DigitalOcean + env: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + SSH_HOST: 64.225.102.81 run: | # Setup SSH Key - SSH_PRIVATE_KEY=${{ secrets.SSH_PRIVATE_KEY }} mkdir -p ~/.ssh echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa - + # Disable SSH Host Key Checking - SSH_HOST="64.225.102.81" echo "$SSH_HOST ssh-ed25519 ..." >> ~/.ssh/known_hosts - + # Copy deploy script to the server scp -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ./scripts/deploy.sh root@$SSH_HOST:/tmp/deploy.sh - + # Execute deploy script on the server ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no root@$SSH_HOST 'bash /tmp/deploy.sh' +