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
|
||||
|
||||
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
|
||||
uses: appleboy/ssh-action@v1.0.0
|
||||
with:
|
||||
host: ${{ secrets.DEV_HOST }}
|
||||
username: ${{ secrets.DEV_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
key_path: ~/.ssh/deploy_key
|
||||
debug: true
|
||||
script: |
|
||||
set -e
|
||||
|
|
@ -40,7 +47,7 @@ jobs:
|
|||
with:
|
||||
host: ${{ secrets.DEV_HOST }}
|
||||
username: ${{ secrets.DEV_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
key_path: ~/.ssh/deploy_key
|
||||
debug: true
|
||||
script: |
|
||||
sleep 10
|
||||
|
|
|
|||
Loading…
Reference in New Issue