update vercel.json #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |