Update deployment workflow for Azure #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CustomerWebpage-Deploy-WF | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - customer-map | |
| paths: | |
| - "frontend/customer-webapp/**" | |
| - ".github/workflows/CustomerWebpage-Deploy-WF.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend/customer-webapp | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint application | |
| run: npm run lint | |
| - name: Build application | |
| run: npm run build | |
| env: | |
| VITE_MAP_TILE_URL: ${{ vars.VITE_MAP_TILE_URL }} | |
| VITE_SIMULATOR_API_BASE: ${{ vars.VITE_SIMULATOR_API_BASE }} | |
| - name: Azure Login | |
| if: github.ref == 'refs/heads/main' | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Deploy to Azure Web App | |
| if: github.ref == 'refs/heads/main' | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: WA-DeliveryBot-dev | |
| package: frontend/customer-webapp/dist |