From 85b7b43824c13dbbf8a7e75ff5d87fc7d971a581 Mon Sep 17 00:00:00 2001 From: jesusfb Date: Fri, 24 Apr 2026 16:46:58 -0700 Subject: [PATCH] action casa ssh --- .github/workflows/deploy.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c8ab4e..a0b5f39 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,16 +1,15 @@ -name: Deploy Automático -on: - push: - branches: - - main # O la rama que uses +name: Deploy Final SSH +on: [push] jobs: deploy: - runs-on: ubuntu-latest # <--- CAMBIO CLAVE: Usa 'host' o 'self-hosted' + runs-on: ubuntu-latest # Esto usa el runner general de Gitea, no el tuyo. steps: - - name: Checkout código - uses: actions/checkout@v3 - - - name: Ejecutar Script de Despliegue - run: | - sudo /usr/bin/bash /opt/deploy.sh \ No newline at end of file + - name: Ejecutar comandos en EC2 + uses: https://github.com/appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + script: | + sudo /usr/bin/bash /opt/deploy.sh \ No newline at end of file