Skip to content

Commit

Permalink
Add DigitalOcean droplet to known_hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
omarciovsena committed May 31, 2024
1 parent 937b21d commit fee7640
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fee7640

Please sign in to comment.