From 06580d8eacdff2066333443e3278c3afd18422a8 Mon Sep 17 00:00:00 2001 From: Francotorrico <95579148+Francotorrico@users.noreply.github.com> Date: Tue, 2 Apr 2024 21:50:52 -0300 Subject: [PATCH] Create pagos_ssh.yml --- .github/workflows/pagos_ssh.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pagos_ssh.yml diff --git a/.github/workflows/pagos_ssh.yml b/.github/workflows/pagos_ssh.yml new file mode 100644 index 0000000..f3464bd --- /dev/null +++ b/.github/workflows/pagos_ssh.yml @@ -0,0 +1,29 @@ +name: SSH a pagos + +on: + push: + branches: + - franco-pagos + +jobs: + ssh_job: + name: SSH Job + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Ejecutar comando SSH + uses: appleboy/ssh-action@master + env: + SSH_PRIVATE_KEY: ${{ secrets.PEM_ORG_PAGOS_DEV }} + REMOTE_USER: ec2-user + REMOTE_HOST: ${{ secrets.IP_PAGOS_DEV }} + APP_NAME: app.js + with: + host: ${{ env.REMOTE_HOST }} + username: ${{ env.REMOTE_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + sudo rm -rf /opt/pagos || true