Skip to content

Commit

Permalink
Setting it up with Vercel CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaldeiradev committed Sep 21, 2023
1 parent 0e7666b commit e10dd75
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
name: CI

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:
branches:
- "main"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci
- run: npm run lint

build:
production-deploy:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci
- run: npm run build
- name: Install Vercel CLI
run: npm i -g vercel@latest
- name: Pull Vercel env info
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build project artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy project artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit e10dd75

Please sign in to comment.