fix: use key_path instead of key for SSH authentication
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
ee49e3260e
commit
3181705968
|
|
@ -9,12 +9,19 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup SSH Key
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
||||||
|
chmod 600 ~/.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
|
||||||
debug: true
|
debug: true
|
||||||
script: |
|
script: |
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -40,7 +47,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
|
||||||
debug: true
|
debug: true
|
||||||
script: |
|
script: |
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue