Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows-cont2 #26

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/deploy_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ jobs:
echo "${{ secrets.EC2_PRIVATE_KEY }}" | tr -d '\r' > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "SSH key file created and permissions set."
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts

echo "Checking DNS resolution for SSH host..."
nslookup ${{ secrets.SSH_HOST }}

echo "Pinging SSH host..."
ping -c 4 ${{ secrets.SSH_HOST }}

echo "Running ssh-keyscan with verbose output..."
ssh-keyscan -v -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts || { echo "ssh-keyscan failed"; exit 1; }
echo "SSH host key added to known_hosts."
env:
EC2_PRIVATE_KEY: ${{ secrets.EC2_PRIVATE_KEY }}
Expand All @@ -39,6 +47,7 @@ jobs:
run: |
echo "Listing ~/.ssh directory contents..."
ls -la ~/.ssh
echo "Displaying SSH key file contents..."
cat ~/.ssh/id_ed25519
echo "Done listing ~/.ssh directory contents."

Expand Down
Loading