Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sobabear authored Oct 11, 2024
1 parent 401acf2 commit b16bb6d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ jobs:
- name: Verify SSH connection
run: ssh -o StrictHostKeyChecking=no root@${{ secrets.VULTR_IP }} "echo 'SSH connection successful'"

# Git clone instead of SCP
- name: Deploy code to Vultr
run: ssh -o StrictHostKeyChecking=no root@${{ secrets.VULTR_IP }} "cd /root/deploy/happiness-backend && git pull || git clone [email protected]:WAI-laboratory/happiness-backend.git /root/deploy/happiness-backend"
run: |
ssh -o StrictHostKeyChecking=no root@${{ secrets.VULTR_IP }} "
if [ -d /root/deploy/happiness-backend ]; then
cd /root/deploy/happiness-backend && git pull;
else
git clone [email protected]:WAI-laboratory/happiness-backend.git /root/deploy/happiness-backend;
fi;
"
# Add a step to install dependencies and build the project
- name: Install dependencies and build project
Expand Down

0 comments on commit b16bb6d

Please sign in to comment.