fix: use absolute path /tmp/.ssh/deploy_key for SSH key
Deploy to Dev / deploy-dev (push) Failing after 2s
Details
Deploy to Dev / deploy-dev (push) Failing after 2s
Details
This commit is contained in:
parent
eb611e809d
commit
c2af4652c0
|
|
@ -9,12 +9,23 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup SSH Key
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/.ssh
|
||||||
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/.ssh/deploy_key
|
||||||
|
chmod 600 /tmp/.ssh/deploy_key
|
||||||
|
echo "SSH key file created at /tmp/.ssh/deploy_key"
|
||||||
|
head -1 /tmp/.ssh/deploy_key
|
||||||
|
tail -1 /tmp/.ssh/deploy_key
|
||||||
|
wc -l /tmp/.ssh/deploy_key
|
||||||
|
ssh-keyscan -H ${{ secrets.DEV_HOST }} >> /tmp/.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: /tmp/.ssh/deploy_key
|
||||||
use_insecure_cipher: true
|
use_insecure_cipher: true
|
||||||
debug: true
|
debug: true
|
||||||
script: |
|
script: |
|
||||||
|
|
@ -41,7 +52,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: /tmp/.ssh/deploy_key
|
||||||
use_insecure_cipher: true
|
use_insecure_cipher: true
|
||||||
debug: true
|
debug: true
|
||||||
script: |
|
script: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue