-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1004 Bytes
/
main.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
37
38
39
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
on:
push:
branches:
- main
jobs:
Deploy-Production:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 04-nestjs-rick-and-morty
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: NPM Install
run: npm install
- name: Install Vercel CLI
run: npm add -g vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ env.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ env.VERCEL_TOKEN }}