fixing deploy action... again
This commit is contained in:
@@ -58,17 +58,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy via SSH
|
- name: Deploy via SSH
|
||||||
run: |
|
run: |
|
||||||
# Write the private key to a temp file
|
# Write the private key
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
|
|
||||||
# Disable strict host checking so first connection doesn't hang
|
# Pre-accept the host key so SSH doesn't hang waiting for input
|
||||||
echo "StrictHostKeyChecking no" >> ~/.ssh/config
|
ssh-keyscan -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
|
||||||
# SSH in and run the redeploy script
|
# SSH in and run the redeploy script
|
||||||
ssh -i ~/.ssh/deploy_key \
|
ssh -i ~/.ssh/deploy_key \
|
||||||
-p ${{ secrets.DEPLOY_PORT }} \
|
-p ${{ secrets.DEPLOY_PORT }} \
|
||||||
|
-o StrictHostKeyChecking=yes \
|
||||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
|
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
|
||||||
"bash /opt/etc-prs/app/scripts/redeploy.sh"
|
"bash /opt/etc-prs/app/scripts/redeploy.sh"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user