diff --git a/.github/workflows/ec2-deploy.yml b/.github/workflows/ec2-deploy.yml index 02a1ac3c3a..bf44783986 100644 --- a/.github/workflows/ec2-deploy.yml +++ b/.github/workflows/ec2-deploy.yml @@ -20,4 +20,8 @@ jobs: - name: Connect to EC2 and deploy run: | - ssh -i ~/.ssh/id_rsa ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "cd Full-Stack-Project-Assessment && git checkout main && git pull && npm install && npm run build" + ssh -i ~/.ssh/id_rsa ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "cd Full-Stack-Project-Assessment && git checkout main && git pull" + + - name: Connect to EC2 and build + run: | + ssh -i ~/.ssh/id_rsa ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "cd Full-Stack-Project-Assessment && npm run build"