-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix host key verification failed <- add remote server to known h…
…osts
- Loading branch information
1 parent
c1c52e9
commit c95db63
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }}:~/\ | ||
|