forked from graycoreio/daffodil
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 2.12 KB
/
deploy.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on:
workflow_call:
inputs:
artifact:
required: true
description: 'The name of the artifact to download'
type: string
artifact-zip-name:
required: false
description: 'The name of the zip file in the artifact (omit if you do not store a zip INSIDE your artifact).'
type: string
secrets:
VERCEL_TOKEN:
required: true
VERCEL_ORG:
required: true
VERCEL_NEXT_PROJECT_ID:
required: true
VERCEL_PROJECT_ID:
required: true
jobs:
next:
name: 'Next'
runs-on: ubuntu-latest
environment:
name: next
url: ${{ steps.vercel-deploy.outputs.url }}
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact }}
- run: unzip -q ${{ inputs.artifact-zip-name }} -d . && rm ${{ inputs.artifact-zip-name }}
name: Unzip internal artifact zip
if: inputs.artifact-zip-name
- uses: graycoreio/github-actions/angular-universal-vercel@main
id: vercel-deploy
with:
prod: true
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_org: ${{ secrets.VERCEL_ORG }}
vercel_project_id: ${{ secrets.VERCEL_NEXT_PROJECT_ID }}
ng_version: '17'
production:
name: 'Production'
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: production
url: ${{ steps.vercel-deploy.outputs.url }}
steps:
- uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact }}
- run: unzip -q ${{ inputs.artifact-zip-name }} -d . && rm ${{ inputs.artifact-zip-name }}
name: Unzip internal artifact zip
if: inputs.artifact-zip-name
- uses: graycoreio/github-actions/angular-universal-vercel@main
id: vercel-deploy
with:
prod: true
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_org: ${{ secrets.VERCEL_ORG }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID }}
ng_version: '17'