-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debug SSH Key length and Print Lines
- Loading branch information
1 parent
f18db28
commit 38bf5ed
Showing
1 changed file
with
15 additions
and
8 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 |
---|---|---|
|
@@ -26,16 +26,23 @@ jobs: | |
- name: Build the app | ||
run: npm run build | ||
|
||
- name: Print Secrets | ||
- name: Debug SSH Key Length and Print Lines | ||
run: | | ||
echo "EC2 Host: ${{ secrets.EC2_HOST }}" | ||
echo "EC2 User: ${{ secrets.EC2_USER }}" | ||
echo "EC2 SSH Key: |" | ||
echo "${{ secrets.EC2_SSH_KEY }}" | ||
echo "This is just for debugging purposes. Make sure to remove it later." | ||
env: | ||
EC2_SSH_KEY: ${{ secrets.EC2_SSH_KEY }} | ||
# Print the length of the SSH key | ||
SSH_KEY="${{ secrets.EC2_SSH_KEY }}" | ||
LENGTH=$(echo "$SSH_KEY" | wc -c) | ||
echo "SSH Key Length: $LENGTH" | ||
# Print the first 2 and last 2 lines of the SSH key | ||
echo "First 2 lines of SSH Key:" | ||
echo "$SSH_KEY" | head -n 2 | ||
echo "..." | ||
echo "Last 2 lines of SSH Key:" | ||
echo "$SSH_KEY" | tail -n 2 | ||
shell: bash | ||
|
||
- name: Copy files to EC2 | ||
uses: appleboy/[email protected] | ||
with: | ||
|