-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 997 Bytes
/
deploy.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
name: Deploy to Vercel
on:
push:
branches:
- main # Cambia "main" por la rama que uses, si es diferente
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Cambia a la versión de Node.js que necesitas
- name: Install Vercel CLI
run: npm install -g vercel
- name: Prepare Credentials and Deploy
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} # El contenido JSON como variable secreta
run: |
mkdir -p google/key # Crea el directorio si no existe
echo "$GOOGLE_CREDENTIALS" > google/key/credentials.json # Crea el archivo JSON
vercel --prod --yes # Usa --yes en lugar de --confirm