Skip to content

Commit

Permalink
add host adding
Browse files Browse the repository at this point in the history
  • Loading branch information
AzizMukhtorjonov committed Jun 25, 2024
1 parent 0b993d2 commit 8a5607a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ jobs:
with:
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}

- name: Add server to known hosts
run: |
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
echo "${{ secrets.SERVER_HOST }} ssh-rsa ${{ secrets.KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
chmod 700 ~/.ssh
- name: Confirm host key
run: ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts

- name: Deploy on Server
run: |
Expand Down

0 comments on commit 8a5607a

Please sign in to comment.