-
Notifications
You must be signed in to change notification settings - Fork 108
52 lines (47 loc) · 1.25 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
name: Deployment
on:
# build when pushing to main/develop, or create a release
push:
branches: [main, develop]
tags: [cowswap-v*, explorer-v*]
workflow_dispatch: # Manually trigger it via UI/CLI/API
inputs:
app:
description: App to deploy
required: true
type: choice
options:
- COWSWAP
- EXPLORER
- ALL
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
app: ALL
vercel-pre-prod:
# Deploys to Vercel staging and barn environments only when there is a tag for CowSwap or Explorer
name: Vercel pre-prod
if: startsWith(github.ref, 'refs/tags')
uses: ./.github/workflows/vercel.yml
secrets: inherit
strategy:
matrix:
env_name: [barn, staging] # deploys both in parallel
with:
env_name: ${{ matrix.env_name }}
app: ALL
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
app: ${{ inputs.app }}