From 1988a002b78e55d594cbb35882545c3a5a5955ae Mon Sep 17 00:00:00 2001 From: Nhay2008 <159199331+Nhay2008@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:02:55 -0300 Subject: [PATCH] cobranzas_dev ci.yml --- .github/workflows/cobranzas_dev ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cobranzas_dev ci.yml b/.github/workflows/cobranzas_dev ci.yml index d6c5cd3..44f80d4 100644 --- a/.github/workflows/cobranzas_dev ci.yml +++ b/.github/workflows/cobranzas_dev ci.yml @@ -46,7 +46,7 @@ jobs: key: ${{ env.EC2_SSH_KEY }} script: | cd /opt/ms-cobranzas-dev-app - sudo git clone -b maicol_cobranzas https://${{ secrets.TOKEN_COBRANZAS }}@github.com/alkemyTech/UMSA-DevOps-T3 . + sudo git clone -b maicol_cobranzas https://${{ secrets.TOKEN_COBRANZAS }}@github.com/alkemyTech/UMSA-DevOps-T3 . - name: Install npm packages uses: appleboy/ssh-action@master @@ -58,7 +58,16 @@ jobs: cd /opt/ms-cobranzas-dev-app sudo npm install express pm2 - - name: Instalar PM2 + - name: Uninstall PM2 if installed + uses: appleboy/ssh-action@master + with: + host: ${{ env.EC2_HOST }} + username: ${{ env.EC2_USERNAME }} + key: ${{ env.EC2_SSH_KEY }} + script: | + sudo npm uninstall -g pm2 || true + + - name: Install PM2 uses: appleboy/ssh-action@master with: host: ${{ env.EC2_HOST }}