File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 30
30
run : npm install
31
31
32
32
- name : Run frontend tests
33
+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
33
34
run : npm run test
34
35
env :
35
36
CI : true
@@ -41,19 +42,17 @@ jobs:
41
42
VITE_APP_ID : ${{ secrets.VITE_APP_ID }}
42
43
43
44
- name : Build frontend
45
+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
44
46
run : npm run build
45
47
env :
46
48
CI : true
47
49
48
50
- name : Deploy to Vercel
49
51
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
50
52
run : npx vercel --prod --token ${{ secrets.VERCEL_TOKEN }}
51
- # working-directory eliminado para evitar el error
52
53
env :
53
54
VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
54
55
VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
55
- working-directory : ./client # <- 🚫 Este fue eliminado para evitar /client/client
56
- # ✅ Ya estás en ./client desde `defaults.run`, así que no es necesario repetir
57
56
58
57
backend :
59
58
runs-on : ubuntu-latest
72
71
- name : Install backend dependencies
73
72
run : npm install
74
73
75
-
76
-
77
74
- name : Run backend tests
75
+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
78
76
run : npm run test:ci
79
77
env :
80
78
CI : true
86
84
service_id : ${{ secrets.RENDER_SERVICE_ID }}
87
85
api_key : ${{ secrets.RENDER_API_KEY }}
88
86
clear_cache : false
87
+ wait_deploy : true
88
+
89
+
90
+ - name : Comentar en el PR
91
+ if : github.event_name == 'pull_request'
92
+ uses : marocchino/sticky-pull-request-comment@v2
93
+ with :
94
+ message : |
95
+ ✅ ¡Pipeline ejecutado correctamente!
96
+ 🔧 Se realizaron pruebas y compilación del frontend y backend.
You can’t perform that action at this time.
0 commit comments