Skip to content

Commit

Permalink
Fill in the .ssh/known_hosts file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyasskin committed Oct 1, 2024
1 parent 0455804 commit 41aa1ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,18 @@ jobs:
run: |
mkdir built-server
tar -xf built-server.tar -C built-server
- name: Store ssh private key
- name: Store ssh private key and host key
run: |
mkdir ~/.ssh
echo "$SSH_KEY" > ~/.ssh/deploy_key
echo "[$SSH_HOST]:$SSH_PORT $SSH_HOST_KEY" > ~/.ssh/known_hosts
chmod 700 ~/.ssh
chmod 600 ~/.ssh/deploy_key
chmod 600 ~/.ssh/*
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ vars.SSH_HOST }}
SSH_PORT: ${{ vars.SSH_PORT }}
SSH_HOST_KEY: ${{ vars.SSH_HOST_KEY }}
- name: Upload
run: rsync -e "ssh -p $SSH_PORT" -azv --safe-links --hard-links --progress --delete built-server/ "$SSH_USER@$SSH_HOST:$DEPLOY_PATH"
env:
Expand Down

0 comments on commit 41aa1ae

Please sign in to comment.