-
Notifications
You must be signed in to change notification settings - Fork 101
40 lines (35 loc) · 978 Bytes
/
deployment.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
name: Deployment
on:
# build when pushing to main/develop, or create a release
push:
branches: [main, develop]
tags: [v*]
workflow_dispatch: # Manually trigger it via UI/CLI/API
jobs:
vercel-dev:
# Deploys to Vercel dev environment
name: Vercel dev
if: github.ref == 'refs/heads/develop'
uses: ./.github/workflows/vercel.yml
secrets: inherit
with:
env_name: dev
vercel-pre-prod:
# Deploys to Vercel staging and barn environments
name: Vercel pre-prod
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/vercel.yml
secrets: inherit
strategy:
matrix:
env_name: [barn, staging] # deploys both in parallel
with:
env_name: ${{ matrix.env_name }}
vercel-prod:
# Deploys to Vercel prod environment
name: Vercel prod
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/vercel.yml
secrets: inherit
with:
env_name: prod