From b6f880430a99e3161c52844fb38a8d8bbf0ebba6 Mon Sep 17 00:00:00 2001 From: Jimmy Zhening Luo <1450044+jimmy-zhening-luo@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:12:21 -0700 Subject: [PATCH] External bug: Microsoft Oryx doesn't support Node 18 --- .../dev-azswa-icy-flower-0d5b30b10.yml | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-azswa-icy-flower-0d5b30b10.yml b/.github/workflows/dev-azswa-icy-flower-0d5b30b10.yml index e4af1f1..6d0669d 100644 --- a/.github/workflows/dev-azswa-icy-flower-0d5b30b10.yml +++ b/.github/workflows/dev-azswa-icy-flower-0d5b30b10.yml @@ -12,13 +12,29 @@ jobs: environment: name: dev url: https://dev.jimm.my - name: Build/Deploy Job (dev) + name: Build and Deploy (dev) steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: submodules: true lfs: false - - name: Build/Deploy Step (dev) + - name: Install Nodejs + uses: NodeTool@0 + with: + versionSource: 'spec' + versionSpec: '18.x' + checkLatest: true + - name: Install Dependencies + uses: Npm@1 + with: + command: 'install' + - name: Build app + uses: Npm@1 + with: + command: 'custom' + customCommand: 'run build' + - name: Deploy (skip build) id: builddeploy uses: Azure/static-web-apps-deploy@v1 with: @@ -31,3 +47,8 @@ jobs: api_location: "" # Api source code path - optional output_location: "build" # Built app content directory - optional ###### End of Repository/Build Configurations ###### + ###### WORKAROUND Node 18 unsupported by Oryx: Build separately using NodeTool@0 and Npm@1; skip build & use external build in Azure SWA Deploy ###### + skip_api_build: true + skip_app_build: true + is_static_export: true + ###### End of WORKAROUND Node 18 unsupported by Oryx ######