-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 1.79 KB
/
Copy pathapp.yml
File metadata and controls
78 lines (67 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Deploy app
on:
push:
branches:
- main
paths:
- src/app/**
- .github/workflows/app.yml
jobs:
build:
runs-on: ubuntu-latest
environment: Development
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
lfs: true
submodules: true
clean: true
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 20.x
cache: yarn
cache-dependency-path: src/app/yarn.lock
- name: Install dependencies
run: |
yarn install --frozen-lockfile
working-directory: src/app
- name: Build project
run: |
yarn build
working-directory: src/app
env:
VITE_API_ROOT: ${{ secrets.VITE_API_ROOT }}
VITE_AZURE_CLIENT_ID: ${{ secrets.VITE_AZURE_CLIENT_ID }}
VITE_AZURE_AUTHORITY: ${{ secrets.VITE_AZURE_AUTHORITY }}
- name: Package artifact
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: app
path: src/app/dist
deploy:
needs: build
permissions:
id-token: write
runs-on: ubuntu-latest
environment: Development
steps:
- name: Download artifact
uses: actions/download-artifact@v8
with:
name: app
path: app
- name: Azure CLI Login
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v3
with:
app-name: app-projectestimate-ui-dev
package: app