From 79ab85a7df99b6102a5404be3be8433965575f30 Mon Sep 17 00:00:00 2001 From: v-rakshinde <142568313+v-rakshinde@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:15:05 +0530 Subject: [PATCH] Changes to fix Static Web App deployment Issue (#213) --- .../azure.yaml | 6 +++++- .../src/auth-context-frontend-app/package.json | 1 + samples/smartonfhir-oncg10-consolidated/azure.yaml | 6 +++++- .../src/auth-context-frontend-app/package.json | 1 + samples/smartonfhir/azure.yaml | 6 +++++- .../smartonfhir/src/auth-context-frontend-app/package.json | 1 + 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/samples/patientandpopulationservices-smartonfhir-oncg10/azure.yaml b/samples/patientandpopulationservices-smartonfhir-oncg10/azure.yaml index c154a832..d7efa64c 100644 --- a/samples/patientandpopulationservices-smartonfhir-oncg10/azure.yaml +++ b/samples/patientandpopulationservices-smartonfhir-oncg10/azure.yaml @@ -18,4 +18,8 @@ services: project: src/auth-context-frontend-app dist: build language: js - host: staticwebapp \ No newline at end of file + host: staticwebapp +hooks: + postprovision: + shell: sh + run: npm run setbuildenv --prefix src/auth-context-frontend-app \ No newline at end of file diff --git a/samples/patientandpopulationservices-smartonfhir-oncg10/src/auth-context-frontend-app/package.json b/samples/patientandpopulationservices-smartonfhir-oncg10/src/auth-context-frontend-app/package.json index 5613d2b6..b7fdbff5 100644 --- a/samples/patientandpopulationservices-smartonfhir-oncg10/src/auth-context-frontend-app/package.json +++ b/samples/patientandpopulationservices-smartonfhir-oncg10/src/auth-context-frontend-app/package.json @@ -26,6 +26,7 @@ "start": "react-scripts start", "prebuild": "npm run envconfig", "build": "react-scripts build", + "setbuildenv": "npm run envconfig && npm run build", "pretest": "npm run envconfig", "test": "react-scripts test", "eject": "react-scripts eject", diff --git a/samples/smartonfhir-oncg10-consolidated/azure.yaml b/samples/smartonfhir-oncg10-consolidated/azure.yaml index c154a832..8abcd20a 100644 --- a/samples/smartonfhir-oncg10-consolidated/azure.yaml +++ b/samples/smartonfhir-oncg10-consolidated/azure.yaml @@ -18,4 +18,8 @@ services: project: src/auth-context-frontend-app dist: build language: js - host: staticwebapp \ No newline at end of file + host: staticwebapp +hooks: + postprovision: + shell: sh + run: npm run setbuildenv --prefix src/auth-context-frontend-app \ No newline at end of file diff --git a/samples/smartonfhir-oncg10-consolidated/src/auth-context-frontend-app/package.json b/samples/smartonfhir-oncg10-consolidated/src/auth-context-frontend-app/package.json index 5613d2b6..b7fdbff5 100644 --- a/samples/smartonfhir-oncg10-consolidated/src/auth-context-frontend-app/package.json +++ b/samples/smartonfhir-oncg10-consolidated/src/auth-context-frontend-app/package.json @@ -26,6 +26,7 @@ "start": "react-scripts start", "prebuild": "npm run envconfig", "build": "react-scripts build", + "setbuildenv": "npm run envconfig && npm run build", "pretest": "npm run envconfig", "test": "react-scripts test", "eject": "react-scripts eject", diff --git a/samples/smartonfhir/azure.yaml b/samples/smartonfhir/azure.yaml index 28c9072b..836e20ae 100644 --- a/samples/smartonfhir/azure.yaml +++ b/samples/smartonfhir/azure.yaml @@ -14,4 +14,8 @@ services: project: src/auth-context-frontend-app dist: build language: js - host: staticwebapp \ No newline at end of file + host: staticwebapp +hooks: + postprovision: + shell: sh + run: npm run setbuildenv --prefix src/auth-context-frontend-app \ No newline at end of file diff --git a/samples/smartonfhir/src/auth-context-frontend-app/package.json b/samples/smartonfhir/src/auth-context-frontend-app/package.json index 5613d2b6..b7fdbff5 100644 --- a/samples/smartonfhir/src/auth-context-frontend-app/package.json +++ b/samples/smartonfhir/src/auth-context-frontend-app/package.json @@ -26,6 +26,7 @@ "start": "react-scripts start", "prebuild": "npm run envconfig", "build": "react-scripts build", + "setbuildenv": "npm run envconfig && npm run build", "pretest": "npm run envconfig", "test": "react-scripts test", "eject": "react-scripts eject",