File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
src/ContosoTraders.Ui.Website/src/services Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,10 @@ jobs:
225225 steps :
226226 - name : checkout code
227227 uses : actions/checkout@v3
228- - name : npm install
229- run : npm install
230- working-directory : src/ContosoTraders.Ui.Website
228+ - name : azure login
229+ uses : azure/login@v1
230+ with :
231+ creds : ${{ secrets.SERVICEPRINCIPAL }}
231232 - name : get carts api endpoint
232233 uses : azure/CLI@v1
233234 id : get-cartsApiEndpoint
@@ -241,19 +242,18 @@ jobs:
241242 - name : substitute tokens in ui configuration
242243 uses : cschleiden/replace-tokens@v1.2
243244 with :
244- tokenPrefix : " {"
245- tokenSuffix : " }"
245+ tokenPrefix : " {{ "
246+ tokenSuffix : " }} "
246247 files : ./src/ContosoTraders.Ui.Website/src/services/configService.js
247248 env :
248249 CARTS_API_ENDPOINT : ${{ steps.get-cartsApiEndpoint.outputs.cartsApiEndpoint }}
249250 PRODUCTS_API_ENDPOINT : ${{ steps.get-productsApiEndpoint.outputs.productsApiEndpoint }}
251+ - name : npm install
252+ run : npm install
253+ working-directory : src/ContosoTraders.Ui.Website
250254 - name : npm run build
251255 run : npm run build
252256 working-directory : src/ContosoTraders.Ui.Website
253- - name : azure login
254- uses : azure/login@v1
255- with :
256- creds : ${{ secrets.SERVICEPRINCIPAL }}
257257 - name : deploy to storage
258258 uses : azure/CLI@v1
259259 with :
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ require("dotenv").config();
44const settingsUrl = "/api/settings" ;
55
66// Note: The '{PRODUCTS_API_ENDPOINT}', '{CARTS_API_ENDPOINT}' tokens will be substituted by github workflow.
7- const APIUrl = 'https://{PRODUCTS_API_ENDPOINT}/v1' ;
8- const APIUrlShoppingCart = 'https://{CARTS_API_ENDPOINT}/v1' ;
7+ const APIUrl = 'https://{{ PRODUCTS_API_ENDPOINT} }/v1' ;
8+ const APIUrlShoppingCart = 'https://{{ CARTS_API_ENDPOINT} }/v1' ;
99const UseB2C = '' ; //process.env.REACT_APP_USEB2C;
1010const B2cAuthority = "https://login.microsoftonline.com/common" ; //process.env.REACT_APP_B2CAUTHORITY;
1111const B2cClientId = "9db8d08a-d9b6-4e4c-8b46-a3898f985735" ; //process.env.REACT_APP_B2CCLIENTID;
You can’t perform that action at this time.
0 commit comments