From 0ce911678f105c9b4c8792afee004d9c7e083027 Mon Sep 17 00:00:00 2001 From: Dhrumil-Gohil Date: Thu, 22 Aug 2024 18:32:16 +0530 Subject: [PATCH] add workflow --- .github/workflows/deployapp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployapp.yml b/.github/workflows/deployapp.yml index 26f6fb1..f139ffb 100644 --- a/.github/workflows/deployapp.yml +++ b/.github/workflows/deployapp.yml @@ -44,6 +44,6 @@ jobs: run: | echo "${{ secrets.EC2_KEY }}" > ~/ec2-key.pem chmod 600 ~/ec2-key.pem - sudo scp -o StrictHostKeyChecking=no -i ~/ec2-key.pem -r build/* ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }}:/var/www/html - sudo ssh -o StrictHostKeyChecking=no -i ~/ec2-key.pem ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} 'sudo systemctl restart nginx' + scp -o StrictHostKeyChecking=no -i ~/ec2-key.pem -r build/* root@${{ secrets.EC2_HOST }}:/var/www/html + ssh -o StrictHostKeyChecking=no -i ~/ec2-key.pem ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} 'sudo systemctl restart nginx'