debug: add env variable and debug output for SSH secret
Deploy to Dev / deploy-dev (push) Failing after 2s Details

This commit is contained in:
Dev Server 2026-02-12 23:07:05 +03:00
parent 5e9bbfcf8f
commit 5fe15456f6
1 changed files with 14 additions and 16 deletions

View File

@ -9,28 +9,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup SSH Key
- name: Debug Secrets
run: |
echo "Checking if SSH_PRIVATE_KEY secret exists..."
if [ -z "${{ secrets.SSH_PRIVATE_KEY }}" ]; then
echo "ERROR: SSH_PRIVATE_KEY secret is empty!"
exit 1
fi
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
echo "SSH key file created. Checking format..."
head -1 ~/.ssh/deploy_key
tail -1 ~/.ssh/deploy_key
wc -l ~/.ssh/deploy_key
ssh-keyscan -H ${{ secrets.DEV_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true
echo "=== Debugging Secrets ==="
echo "DEV_HOST: ${{ secrets.DEV_HOST }}"
echo "DEV_USER: ${{ secrets.DEV_USER }}"
echo "SSH_PRIVATE_KEY length: ${#SSH_PRIVATE_KEY}"
echo "SSH_PRIVATE_KEY first 50 chars: ${SSH_PRIVATE_KEY:0:50}"
echo "All secrets:"
env | grep -E "SECRET|SSH|DEV" || echo "No secrets found"
- name: Deploy to Dev Server
uses: appleboy/ssh-action@v1.0.0
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USER }}
key_path: ~/.ssh/deploy_key
key: ${{ secrets.SSH_PRIVATE_KEY }}
use_insecure_cipher: true
debug: true
script: |
@ -54,10 +50,12 @@ jobs:
- name: Health Check
uses: appleboy/ssh-action@v1.0.0
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USER }}
key_path: ~/.ssh/deploy_key
key: ${{ secrets.SSH_PRIVATE_KEY }}
use_insecure_cipher: true
debug: true
script: |