-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 931 Bytes
/
dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
pm2 restart RefaDiazApp