Skip to content

Merge pull request #5 from BananasDev0/RF-23 #8

Merge pull request #5 from BananasDev0/RF-23

Merge pull request #5 from BananasDev0/RF-23 #8

Workflow file for this run

name: DEV Despliegue en EC2
on:
push:
branches:
- dev # Cambia 'dev' por la rama que desees
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout código
uses: actions/checkout@v4
- name: Copiar archivos al servidor
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_EC2_HOST }}
username: ${{ secrets.DEV_EC2_USER }}
key: ${{ secrets.DEV_SSH_PRIVATE_KEY }}
port: 22
source: "."
target: "projects/RefaDiazFrontEnd"
- name: Ejecutar comandos remotos
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEV_EC2_HOST }}
username: ${{ secrets.DEV_EC2_USER }}
key: ${{ secrets.DEV_SSH_PRIVATE_KEY }}
port: 22
script: |
cd projects/RefaDiazFrontEnd
npm install
npm run build
pm2 restart RefaDiazApp