Skip to content

Commit

Permalink
fix deploy bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshamoon committed Aug 1, 2024
1 parent ce5a4b6 commit b688f49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Create known_hosts file
run: |
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
- name: Add remote host key to known_hosts
run: ssh-keyscan ${{ secrets.SERVERIP }} >> ~/.ssh/known_hosts
- name: Deploy to EC2
run: |
ssh-keyscan ${{ secrets.SERVERIP }} >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
ssh ${{ secrets.SERVER }} "source ~/.nvm/nvm.sh; cd /home/ddp/DDP_backend; git pull; /home/ddp/.yarn/bin/pm2 restart django-celery-worker django-backend"
Expand Down

0 comments on commit b688f49

Please sign in to comment.