-
Notifications
You must be signed in to change notification settings - Fork 52
49 lines (45 loc) · 1.55 KB
/
CI-CD_MVP.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
name: CI-CD - MVP Site
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- .github/workflows/CI-CD_MVP.yml
- .github/workflows/build_DotNet.yml
- .github/workflows/deploy_azureWebapp.yml
- 'headapps/MvpSite/**'
pull_request:
branches: [ main ]
paths:
- .github/workflows/CI-CD_MVP.yml
- .github/workflows/build_DotNet.yml
- .github/workflows/deploy_azureWebapp.yml
- 'headapps/MvpSite/**'
jobs:
build-dotnet:
uses: ./.github/workflows/build_DotNet.yml
with:
buildConfiguration: Release
solution: headapps/MvpSite/XMC-Introduction-MVP.sln
deploy-mvp-staging:
uses: ./.github/workflows/deploy_azureWebapp.yml
needs: build-dotnet
if: github.repository_owner == 'Sitecore' && ((github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch'))
with:
buildConfiguration: Debug
projectLocation: headapps/MvpSite/MvpSite.Rendering
assetName: Mvp-Staging
webAppName: Mvp-Staging
secrets:
publishingProfile: ${{ secrets.STAGING_MVP_WEBAPP_PUBLISHING_PROFILE }}
deploy-mvp-prod:
if: github.ref == 'refs/heads/main'
needs: deploy-mvp-staging
uses: ./.github/workflows/deploy_azureWebapp.yml
with:
buildConfiguration: Release
projectLocation: headapps/MvpSite/MvpSite.Rendering
assetName: Mvp-prod
webAppName: Mvp-Production
secrets:
publishingProfile: ${{ secrets.PROD_MVP_WEBAPP_PUBLISHING_PROFILE }}