Skip to content

Commit

Permalink
fix deploy ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
jabahum committed Dec 9, 2024
1 parent 3142705 commit f8b1fd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ jobs:
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: |
github.com
${{ secrets.SERVER_IP }}
# Step 4: Sync docker-compose.yml to the server
- name: Sync docker-compose.yml to Server
run: |
rsync -avz -e "ssh -o StrictHostKeyChecking=no" docker-compose.yml "${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}:/home/ugandaemr"
rsync -avz -e "ssh" docker-compose.yml "${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}:/home/ugandaemr"
# Step 5: SSH into the server, pull the latest image, and restart services
- name: Update and Restart Services on Server
run: |
ssh -o StrictHostKeyChecking=no "${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}" << 'EOF'
ssh "${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}" << 'EOF'
cd /home/ugandaemr
docker-compose pull
docker-compose up -d
Expand Down

0 comments on commit f8b1fd7

Please sign in to comment.