99 runs-on : windows-latest
1010 steps :
1111 - uses : actions/checkout@v3
12-
13- - name : Modify web.config files in all apps
14- shell : pwsh
15- run : |
16- $webConfigPaths = @(
17- "${{ github.workspace }}\AdminUI\LearningHub.Nhs.AdminUI\web.config",
18- "${{ github.workspace }}\WebAPI\LearningHub.Nhs.Api\web.config",
19- "${{ github.workspace }}\LearningHub.Nhs.WebUI\web.config"
20- )
21-
22- foreach ($path in $webConfigPaths) {
23- if (Test-Path $path) {
24- Write-Host "Modifying $path"
25- [xml]$config = Get-Content $path
26-
27- if (-not $config.configuration.'system.webServer') {
28- $systemWebServer = $config.CreateElement("system.webServer")
29- $config.configuration.AppendChild($systemWebServer) | Out-Null
30- } else {
31- $systemWebServer = $config.configuration.'system.webServer'
32- }
33-
34- if (-not $systemWebServer.httpProtocol) {
35- $httpProtocol = $config.CreateElement("httpProtocol")
36- $systemWebServer.AppendChild($httpProtocol) | Out-Null
37- } else {
38- $httpProtocol = $systemWebServer.httpProtocol
39- }
40-
41- if (-not $httpProtocol.customHeaders) {
42- $customHeaders = $config.CreateElement("customHeaders")
43- $httpProtocol.AppendChild($customHeaders) | Out-Null
44- } else {
45- $customHeaders = $httpProtocol.customHeaders
46- }
47-
48- foreach ($name in @("X-Powered-By", "Server")) {
49- $removeNode = $config.CreateElement("remove")
50- $removeNode.SetAttribute("name", $name)
51- $customHeaders.AppendChild($removeNode) | Out-Null
52- }
53-
54- if (-not $systemWebServer.security) {
55- $security = $config.CreateElement("security")
56- $systemWebServer.AppendChild($security) | Out-Null
57- } else {
58- $security = $systemWebServer.security
59- }
60-
61- if (-not $security.requestFiltering) {
62- $requestFiltering = $config.CreateElement("requestFiltering")
63- $requestFiltering.SetAttribute("removeServerHeader", "true")
64- $security.AppendChild($requestFiltering) | Out-Null
65- }
66-
67- $config.Save($path)
68- } else {
69- Write-Host "File not found : $path"
70- }
71- }
72-
12+
7313 - name : Setup .NET Core SDK 8.0
7414 uses : actions/setup-dotnet@v3
7515 with :
@@ -80,30 +20,27 @@ jobs:
8020 dotnet nuget remove source LearningHubFeed || true
8121 dotnet nuget add source 'https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json' --name 'LearningHubFeed' --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text
8222
83- - name : Use Node 20 with Yarn
23+ - name : Use Node 14
8424 uses : actions/setup-node@v4
8525 with :
86- node-version : ' 20'
87- cache : ' npm'
88-
89- - name : Upgrade npm to the latest version
90- run :
npm install -g [email protected] 26+ node-version : ' 14'
27+ cache : ' npm'
9128
92- - name : Typescript install WebUI
93- run : yarn install --network-timeout 600000 --frozen-lockfile
29+ - name : npm install WebUI
30+ run : npm install
9431 working-directory : ./LearningHub.Nhs.WebUI
95-
96- - name : Typescript build WebUI
97- run : yarn build:webpack
32+
33+ - name : npm build WebUI
34+ run : npm run build:webpack
9835 working-directory : ./LearningHub.Nhs.WebUI
9936
100- - name : Typescript install AdminUI
101- run : yarn install
37+ - name : npm install AdminUI
38+ run : npm install
10239 working-directory : ./AdminUI/LearningHub.Nhs.AdminUI
103-
104- - name : Typescript build AdminUI
105- run : yarn build:webpack
106- working-directory : ./AdminUI/LearningHub.Nhs.AdminUI
40+
41+ - name : npm build AdminUI
42+ run : npm run build:webpack
43+ working-directory : ./AdminUI/LearningHub.Nhs.AdminUI
10744
10845 - name : Setup MSBuild
10946@@ -183,5 +120,4 @@ jobs:
183120 }
184121
185122 # - name: Test
186- # run: dotnet test ${{ env.BuildParameters.TestProjects }}
187-
123+ # run: dotnet test ${{ env.BuildParameters.TestProjects }}
0 commit comments