Skip to content

Commit d70de83

Browse files
committed
Use App Service workflow for customer webapp deploy
1 parent 08a35d6 commit d70de83

2 files changed

Lines changed: 25 additions & 61 deletions

File tree

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
name: CustomerWebpage-Deploy-WF
22

33
on:
4+
push:
5+
branches:
6+
- main
7+
- customer-map
8+
paths:
9+
- "frontend/customer-webapp/**"
10+
- ".github/workflows/CustomerWebpage-Deploy-WF.yml"
411
workflow_dispatch:
512

13+
permissions:
14+
contents: read
15+
616
jobs:
717
build-and-deploy:
18+
name: Build and deploy customer web app
819
runs-on: ubuntu-latest
920

21+
defaults:
22+
run:
23+
working-directory: frontend/customer-webapp
24+
1025
steps:
1126
- name: Checkout repository
1227
uses: actions/checkout@v4
@@ -15,18 +30,24 @@ jobs:
1530
uses: actions/setup-node@v4
1631
with:
1732
node-version: '22.x'
33+
cache: npm
34+
cache-dependency-path: frontend/customer-webapp/package-lock.json
1835

1936
- name: Install dependencies
20-
working-directory: ./frontend
21-
run: npm install
37+
run: npm ci
38+
39+
- name: Lint React app
40+
run: npm run lint
2241

2342
- name: Build React app
24-
working-directory: ./frontend
2543
run: npm run build
44+
env:
45+
VITE_MAP_TILE_URL: ${{ vars.VITE_MAP_TILE_URL }}
46+
VITE_SIMULATOR_API_BASE: ${{ vars.VITE_SIMULATOR_API_BASE }}
2647

2748
- name: Deploy to Azure Web App
2849
uses: azure/webapps-deploy@v3
2950
with:
3051
app-name: 'WA-DeliveryBot-dev'
3152
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1BA6A9C76C684517B5106BD8ACF4CE5B }}
32-
package: ./frontend/dist
53+
package: frontend/customer-webapp/dist

.github/workflows/deploy-customer-webapp.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)