fix: add debug step to check SSH secret
Deploy to Dev / deploy-dev (push) Failing after 1s
Details
Deploy to Dev / deploy-dev (push) Failing after 1s
Details
This commit is contained in:
parent
44b822aa11
commit
5e9bbfcf8f
|
|
@ -9,12 +9,28 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup SSH Key
|
||||||
|
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
|
||||||
|
|
||||||
- name: Deploy to Dev Server
|
- name: Deploy to Dev Server
|
||||||
uses: appleboy/ssh-action@v1.0.0
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.DEV_HOST }}
|
host: ${{ secrets.DEV_HOST }}
|
||||||
username: ${{ secrets.DEV_USER }}
|
username: ${{ secrets.DEV_USER }}
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
key_path: ~/.ssh/deploy_key
|
||||||
use_insecure_cipher: true
|
use_insecure_cipher: true
|
||||||
debug: true
|
debug: true
|
||||||
script: |
|
script: |
|
||||||
|
|
@ -41,7 +57,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.DEV_HOST }}
|
host: ${{ secrets.DEV_HOST }}
|
||||||
username: ${{ secrets.DEV_USER }}
|
username: ${{ secrets.DEV_USER }}
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
key_path: ~/.ssh/deploy_key
|
||||||
use_insecure_cipher: true
|
use_insecure_cipher: true
|
||||||
debug: true
|
debug: true
|
||||||
script: |
|
script: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue