From 2a86c55b8ae93d6946fb13852f231ec8d05e8c0c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Apr 2024 12:06:32 +0530 Subject: [PATCH 1/6] node version --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 5df3165fe..09fc4ae8a 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -69,6 +69,7 @@ jobs: run: | cd webapps-deploy npm install + node --v npm run build - name: Azure authentication From 537ac4c75248a50261bb5f42c500250d9b2bd2be Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Apr 2024 12:14:13 +0530 Subject: [PATCH 2/6] node version --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 09fc4ae8a..1d97603e0 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -69,7 +69,7 @@ jobs: run: | cd webapps-deploy npm install - node --v + node --version npm run build - name: Azure authentication From d4b27966841751450c87dea94343cab442de6e94 Mon Sep 17 00:00:00 2001 From: Shilpi Rachna Date: Thu, 4 Apr 2024 17:18:38 +0530 Subject: [PATCH 3/6] Added node_modules cleanup before npm install --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 1d97603e0..98f71f15c 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -68,6 +68,9 @@ jobs: - name: Installing dependencies and building latest changes run: | cd webapps-deploy + rm -rf node_modules + rm -rf package-lock.json + npm cache clean --force npm install node --version npm run build From 73cafa15528fedf3ce9092d6f664e011c25f4469 Mon Sep 17 00:00:00 2001 From: Shilpi Rachna Date: Thu, 4 Apr 2024 22:41:21 +0530 Subject: [PATCH 4/6] Fixing rm command --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 98f71f15c..cb99ab828 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -68,8 +68,8 @@ jobs: - name: Installing dependencies and building latest changes run: | cd webapps-deploy - rm -rf node_modules - rm -rf package-lock.json + rm node_modules -r -fo + rm package-lock.json -r -fo npm cache clean --force npm install node --version From 1cfbdd9040b1ae6aeb90c509d8bc98662a753a52 Mon Sep 17 00:00:00 2001 From: Shilpi Rachna Date: Thu, 4 Apr 2024 23:29:22 +0530 Subject: [PATCH 5/6] Fixing rmdir command --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index cb99ab828..08cd259e2 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -68,7 +68,7 @@ jobs: - name: Installing dependencies and building latest changes run: | cd webapps-deploy - rm node_modules -r -fo + rmdir node_modules /s /q rm package-lock.json -r -fo npm cache clean --force npm install From c6e5c261b8a59a53e6502a2c6482d9b1e14e5501 Mon Sep 17 00:00:00 2001 From: Shilpi Rachna Date: Fri, 5 Apr 2024 10:13:55 +0530 Subject: [PATCH 6/6] Added check for node_modules and made build conditional --- .github/workflows/pr_check_webapp_dotnet_windows.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_check_webapp_dotnet_windows.yml b/.github/workflows/pr_check_webapp_dotnet_windows.yml index 08cd259e2..d6eb2bf80 100644 --- a/.github/workflows/pr_check_webapp_dotnet_windows.yml +++ b/.github/workflows/pr_check_webapp_dotnet_windows.yml @@ -68,12 +68,11 @@ jobs: - name: Installing dependencies and building latest changes run: | cd webapps-deploy - rmdir node_modules /s /q - rm package-lock.json -r -fo - npm cache clean --force - npm install - node --version - npm run build + if (-NOT(TEST-PATH node_modules)) + { + npm install + npm run build + } - name: Azure authentication uses: azure/login@v1