Skip to content

Commit

Permalink
Updated GitHub Actions to match new repository structure
Browse files Browse the repository at this point in the history
  • Loading branch information
robearlam committed Sep 18, 2024
1 parent 1a223d0 commit fbac22b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/CI-CD_MVP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@ on:
- .github/workflows/CI-CD_MVP.yml
- .github/workflows/build_DotNet.yml
- .github/workflows/deploy_azureWebapp.yml
- 'src/**/rendering/**'
- 'headapps/MvpSite/**'
pull_request:
branches: [ main ]
paths:
- .github/workflows/CI-CD_MVP.yml
- .github/workflows/build_DotNet.yml
- .github/workflows/deploy_azureWebapp.yml
- 'src/**/rendering/**'
- '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: src/Project/MvpSite/rendering
projectLocation: headapps/MvpSite/Mvp.Project.MvpSite.Rendering
assetName: Mvp-Staging
webAppName: Mvp-Staging
secrets:
Expand All @@ -41,7 +42,7 @@ jobs:
uses: ./.github/workflows/deploy_azureWebapp.yml
with:
buildConfiguration: Release
projectLocation: src/Project/MvpSite/rendering
projectLocation: headapps/MvpSite/Mvp.Project.MvpSite.Rendering
assetName: Mvp-prod
webAppName: Mvp-Production
secrets:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI-CD_SUGCON_24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:
- .github/workflows/CI-CD_SUGCON_24.yml
- .github/workflows/build_NextJs.yml
- .github/workflows/deploy_vercel.yml
- 'src/Project/Sugcon2024/Sugcon/**'
- 'headapps/Sugcon2024/**'
pull_request:
branches: [ main ]
paths:
- .github/workflows/CI-CD_SUGCON_24.yml
- .github/workflows/build_NextJs.yml
- .github/workflows/deploy_vercel.yml
- 'src/Project/Sugcon2024/Sugcon/**'
- 'headapps/Sugcon2024/**'

jobs:

build-sugcon24-site:
if: github.ref != 'refs/heads/main'
uses: ./.github/workflows/build_NextJs.yml
with:
workingDirectory: ./src/Project/Sugcon2024/Sugcon
workingDirectory: ./headapps/Sugcon2024

deploy-sugcon24-site:
uses: ./.github/workflows/deploy_vercel.yml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI-CD_SUGCON_24_STORYBOOK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:
- .github/workflows/CI-CD_SUGCON_24_STORYBOOK.yml
- .github/workflows/build_NextJs.yml
- .github/workflows/deploy_vercel.yml
- 'src/Project/Sugcon2024/Sugcon/**'
- 'headapps/Sugcon2024/**'
pull_request:
branches: [ main ]
paths:
- .github/workflows/CI-CD_SUGCON_24_STORYBOOK.yml
- .github/workflows/build_NextJs.yml
- .github/workflows/deploy_vercel.yml
- 'src/Project/Sugcon2024/Sugcon/**'
- 'headapps/Sugcon2024/**'

jobs:

build-sugcon24-storybook:
if: github.ref != 'refs/heads/main'
uses: ./.github/workflows/build_NextJs_Storybook.yml
with:
workingDirectory: ./src/Project/Sugcon2024/Sugcon
workingDirectory: ./headapps/Sugcon2024

deploy-sugcon24-storybook:
uses: ./.github/workflows/deploy_vercel.yml
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/CI-CD_XM_Cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,25 @@ on:
- .github/workflows/deploy_xmCloud.yml
- .github/workflows/build_DotNet.yml
- 'xmcloud.build.json'
- 'src/**/platform/**'
- 'src/**/items/**'
- 'src/Project/Sugcon2024/**'
- 'src/Project/Sugcon/**'
- 'authoring/**'
- 'headapps/Sugcon2024/**'
pull_request:
branches: [ main ]
paths:
- .github/workflows/CI-CD_XM_Cloud.yml
- .github/workflows/deploy_xmCloud.yml
- .github/workflows/build_DotNet.yml
- 'xmcloud.build.json'
- 'src/**/platform/**'
- 'src/**/items/**'
- 'src/Project/Sugcon2024/**'
- 'src/Project/Sugcon/**'
- 'authoring/**'
- 'headapps/Sugcon2024/**'

jobs:

build-dotnet:
uses: ./.github/workflows/build_DotNet.yml
with:
buildConfiguration: Release
solution: authoring/platform/XMC-Introduction-Authoring.sln

deploy-staging:
uses: ./.github/workflows/deploy_xmCloud.yml
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_DotNet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
buildConfiguration:
required: true
type: string
solution:
required: true
type: string

jobs:
build-dotnet:
Expand All @@ -20,6 +23,6 @@ jobs:
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore NuGet packages
run: nuget restore src\XmCloudIntroduction.sln
run: nuget restore ${{ inputs.solution }}
- name: Build
run: msbuild src\XmCloudIntroduction.sln /p:Configuration=${{ inputs.buildConfiguration }}
run: msbuild ${{ inputs.solution }} /p:Configuration=${{ inputs.buildConfiguration }}
6 changes: 3 additions & 3 deletions xmcloud.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
},
"buildTargets":
[
"./src/Environment/platform/Mvp.Environment.Platform.csproj",
"./src/Project/MvpSite/platform/Mvp.Project.MvpSite.Platform.csproj"
"./authoring/platform/Mvp.Environment.Platform.csproj",
"./authoring/platform/Mvp.Project.MvpSite.Platform.csproj"
],
"renderingHosts": {
"sugcon2024eu": {
"path": "./src/Project/Sugcon2024/Sugcon",
"path": "./headapps/Sugcon2024",
"nodeVersion": "20.10.0",
"jssDeploymentSecret": "110F1C44A496B45478640DD36F80C18C9",
"enabled": true,
Expand Down

0 comments on commit fbac22b

Please sign in to comment.