From cfdccf33deb6f7ec99181e3a418936cf37e13ae2 Mon Sep 17 00:00:00 2001 From: RbAvci Date: Fri, 21 Jun 2024 00:29:20 +0100 Subject: [PATCH] divide deploy and build in workflow --- .github/workflows/ec2-deploy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"