From fee7640539c04e36f55815a78626427bd651943f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Vin=C3=ADcius=20Sena?= Date: Fri, 31 May 2024 17:08:00 -0300 Subject: [PATCH] Add DigitalOcean droplet to known_hosts --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9c9b11d..683a325 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,10 +17,11 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - name: Add DigitalOcean droplet to known_hosts + run: ssh-keyscan ${{ secrets.DROPLET_IP }} >> ~/.ssh/known_hosts + - name: Copy project files to the server - run: | - echo 'SECRET_KEY=${{ secrets.SECRET_KEY }}' - rsync -avz --exclude '/node_modules/' --exclude '/.git/' ./ root@${{ secrets.DROPLET_IP }}:/root/abibliadigital/ + run: rsync -avz --exclude '/node_modules/' --exclude '/.git/' ./ root@${{ secrets.DROPLET_IP }}:/root/abibliadigital/ - name: Build container run: ssh root@${{ secrets.DROPLET_IP }} "cd /root/abibliadigital/ && docker-compose up -d --build"