-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (44 loc) · 1.33 KB
/
ci.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
40
41
42
43
44
45
46
47
48
49
50
51
name: CI
on:
push:
branches:
- '**'
jobs:
build:
name: Build and Deploy to Vercel
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
timeout-minutes: 10
- uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
timeout-minutes: 15
- name: Deploy to Vercel (Staging)
if: ${{ github.ref != 'refs/heads/main' }}
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./
github-comment: false
timeout-minutes: 5
- name: Deploy to Vercel (Production)
if: ${{ github.ref == 'refs/heads/main' }}
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: --prod
working-directory: ./
github-comment: false
timeout-minutes: 5