Skip to content

Commit

Permalink
fix: fix host key verification failed <- add remote server to known h…
Browse files Browse the repository at this point in the history
…osts
  • Loading branch information
thisisWooyeol committed Nov 20, 2023
1 parent c1c52e9 commit c95db63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/springboot-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,17 @@ jobs:
- name: Test with Gradle
run: ./gradlew test

# Deploy
- name: Set up SSH
# Setup SSH
- name: Set up SSH agent with private key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SPRINGBOOT_EC2_SSH_KEY }}
- name: Add remote server to known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.SPRINGBOOT_HOST_DNS }} >> ~/.ssh/known_hosts
# Deploy
- name: SCP jar file to server
run: |
scp *jar ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }}:~/\
Expand Down

0 comments on commit c95db63

Please sign in to comment.