Skip to content

Commit

Permalink
fixing actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gaskar committed Jan 7, 2024
1 parent fe18a45 commit 0f1b4a5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 0f1b4a5

Please sign in to comment.