Skip to content

Commit

Permalink
debug SSH Key length and Print Lines
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloccangucu committed Sep 24, 2024
1 parent f18db28 commit 38bf5ed
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 38bf5ed

Please sign in to comment.