Skip to content

Commit 6623f4d

Browse files
committed
added sudo to the systemctl restart command
1 parent 6702214 commit 6623f4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525

2626
- name: Deploy Application
2727
run: |
28-
ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/id_rsa ubuntu@${{ secrets.EC2_PUBLIC_IP }} "cd /home/ubuntu/fastapi-application-with-cicd-pipeline && git pull origin main && systemctl restart fastapi.service"
28+
ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/id_rsa ubuntu@${{ secrets.EC2_PUBLIC_IP }} "cd /home/ubuntu/fastapi-application-with-cicd-pipeline && git pull origin main && sudo systemctl restart fastapi.service"

0 commit comments

Comments
 (0)