Skip to content

Commit

Permalink
cicd: Add StrictHostKeyChecking option to ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
hoang-rio committed Nov 26, 2024
1 parent 924e4c5 commit 8ca68b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy_with_git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
SSH_KEY_FILE_PATH: .keys/deploy_key.pem

jobs:
deploy:
ssh_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -31,6 +31,6 @@ jobs:
if [[ $HAS_PYTHON_CHANGE == true ]]; then
SSH_COMAND_DEPLOY="$SSH_COMAND_DEPLOY && kill $(ps | grep app.py | grep -v grep | awk '{print $2}') && nohup python app.py &"
fi
ssh -i ${{env.SSH_KEY_FILE_PATH}} ${{secrets.SSH_DEPLOY_USER}}@${{secrets.SSH_DEPLOY_HOST}} "$SSH_COMAND_DEPLOY"
ssh -i -o StrictHostKeyChecking=no ${{env.SSH_KEY_FILE_PATH}} ${{secrets.SSH_DEPLOY_USER}}@${{secrets.SSH_DEPLOY_HOST}} "$SSH_COMAND_DEPLOY"
- name: Clean deploy key file
run: rm -rf ${{env.SSH_KEY_FILE_PATH}}

0 comments on commit 8ca68b0

Please sign in to comment.