Skip to content

Commit

Permalink
Merge pull request #156 from AnkanSaha/dev
Browse files Browse the repository at this point in the history
Fix deployment script to delete App folder if it exists before copyin…
  • Loading branch information
AnkanSaha authored Apr 7, 2024
2 parents e488d5f + aa3f683 commit 344b61c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > private_key.pem
chmod 600 private_key.pem
- name: Check if App folder exists and delete if it does
run: |
ssh -i private_key.pem ${{ secrets.USERNAME }}@${{ secrets.VM_IP }} '[ -d ~/App ] && rm -rf ~/App || true'
- name: Copy code to VM
run: |
sudo scp -o StrictHostKeyChecking=no -i private_key.pem -r ./* ${{ secrets.USERNAME }}@${{ secrets.VM_IP }}:~/ # Copies all files and directories to the home directory of the user on VM
sudo scp -o StrictHostKeyChecking=no -i private_key.pem -r ./* ${{ secrets.USERNAME }}@${{ secrets.VM_IP }}:~/App # Copies all files and directories to the home directory of the user on VM
- name: Clean Up
run: |
Expand Down

0 comments on commit 344b61c

Please sign in to comment.