-
Notifications
You must be signed in to change notification settings - Fork 0
/
client-pipeline.yml
43 lines (35 loc) · 1.28 KB
/
client-pipeline.yml
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
trigger:
branches:
include:
- master
paths:
include:
- client
variables:
- group: az-credentials
pool:
vmImage: ubuntu-latest
steps:
- script: |
npm update -g npm \
npm install -g yarn
workingDirectory: $(Build.SourcesDirectory)/client
displayName: Install Yarn
- script: yarn install
workingDirectory: $(Build.SourcesDirectory)/client
displayName: Install Yarn Packages
- script: yarn build
workingDirectory: $(Build.SourcesDirectory)/client
displayName: Build Static Assets
- script: az login --service-principal --username $ARM_CLIENT_ID --password $ARM_CLIENT_SECRET --tenant $ARM_TENANT_ID
displayName: Login to Azure using the AzureDevOps Service Principle
env:
ARM_CLIENT_ID: $(ARM_CLIENT_ID)
ARM_CLIENT_SECRET: $(ARM_CLIENT_SECRET)
ARM_TENANT_ID: $(ARM_TENANT_ID)
- script: az storage blob upload-batch -s ./dist -d '$web' --account-name $(SpaStorageAccountName) --overwrite=true
workingDirectory: $(Build.SourcesDirectory)/client
displayName: Copy static assets to Storage Account
- script: az storage blob upload -f ./configs/staticwebapp.config.json -c '$web' --account-name $(SpaStorageAccountName) --overwrite=true
workingDirectory: $(Build.SourcesDirectory)/client
displayName: Copy config for client-side routing