-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (83 loc) · 3.02 KB
/
staging.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Staging workflow
on:
workflow_dispatch:
push:
branches:
- master
env:
CI: true
HUSKY: 0
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-paths:
name: Check modified paths
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
unified: ${{ steps.paths.outputs.unified }}
login: ${{ steps.paths.outputs.login }}
dynamic-forms-preview: ${{ steps.paths.outputs.dynamic-forms-preview }}
dynamic-forms-form-settings: ${{ steps.paths.outputs.dynamic-forms-form-settings }}
dynamic-forms-subscriptions: ${{ steps.paths.outputs.dynamic-forms-subscriptions }}
packages: ${{ steps.paths.outputs.packages }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Check paths
id: paths
uses: ./.github/actions/check-paths
unified-web-app-preview-deployment:
name: Deploy Unified-web App (Vercel Preview)
if: ${{ needs.check-paths.outputs.unified == 'true' || needs.check-paths.outputs.packages == 'true' }}
needs: check-paths
uses: ./.github/workflows/reusable-vercel-deploy.yml
with:
app-name: 'Unified-web App'
github-environment: 'staging'
vercel-environment: 'preview'
domains: staging-domain-1.vercel.app
secrets: inherit
login-app-preview-deployment:
name: Deploy Login App (Vercel Preview)
if: ${{ needs.check-paths.outputs.login == 'true' || needs.check-paths.outputs.packages == 'true' }}
needs: check-paths
uses: ./.github/workflows/reusable-vercel-deploy.yml
with:
app-name: 'Login App'
github-environment: 'staging'
vercel-environment: 'preview'
domains: |
other-staging-domain-2.vercel.app
other-staging-domain-3.vercel.app
secrets: inherit
dynamic-forms-preview-staging-deploy:
name: Deploy Dynamic Forms Preview (Contentful Staging)
if: ${{ needs.check-paths.outputs.dynamic-forms-preview == 'true' }}
needs: [check-paths]
uses: ./.github/workflows/reusable-contentful-deploy.yml
with:
app-name: 'Dynamic Forms Preview'
app-definition: ''
github-environment: 'staging'
dynamic-forms-form-settings-staging-deploy:
name: Deploy Dynamic Forms Form Settings (Contentful Staging)
if: ${{ needs.check-paths.outputs.dynamic-forms-form-settings == 'true' }}
needs: [check-paths]
uses: ./.github/workflows/reusable-contentful-deploy.yml
with:
app-name: 'Dynamic Forms Form Settings'
app-definition: ''
github-environment: 'staging'
dynamic-forms-subscriptions-staging-deploy:
name: Deploy Dynamic Forms Subscriptions (Contentful Staging)
if: ${{ needs.check-paths.outputs.dynamic-forms-subscriptions == 'true' }}
needs: [check-paths]
uses: ./.github/workflows/reusable-contentful-deploy.yml
with:
app-name: 'Dynamic Forms Subscriptions'
app-definition: ''
github-environment: 'staging'