-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (56 loc) · 2.05 KB
/
deploy-frontend.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
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
name: Deploy Frontend on Azure
on:
workflow_dispatch:
inputs:
environment_name:
description: "Environment Name"
required: true
default: ""
jobs:
Deploy-Frontend:
environment:
name: ${{ github.event.inputs.environment_name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_SERVICE_PRINCIPAL }}
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Download Frontend Artifact
uses: dawidd6/[email protected]
with:
workflow: build-frontend.yml
name: savings-frontend
branch: ${{ steps.extract_branch.outputs.branch }}
path: ./deploy
- name: Config Settings Substitution
uses: microsoft/variable-substitution@v1
with:
files: 'deploy/wwwroot/appsettings.json'
env:
SavingsApiServiceUrl: ${{ vars.APPSERVICE_FE_CONFIG_APIURL }}
ApiKey: ${{ secrets.APPSERVICE_CONFIG_APIKEY }}
AuthenticationToUse: 'AzureAD'
AzureAd.Authority: ${{ vars.APPSERVICE_CONFIG_IDENTITY_AUTHORITY }}
AzureAd.ClientId: ${{ vars.APPSERVICE_FE_CONFIG_CLIENT_ID }}
AzureAd.ValidateAuthority: true
AzureAd.DefaultScope: ${{ vars.APPSERVICE_FE_CONFIG_DEFAULT_SCOPE }}
- name: Manifest AppName Substitution
uses: microsoft/variable-substitution@v1
with:
files: 'deploy/wwwroot/manifest.json'
env:
name: "Savings ${{ github.event.inputs.environment_name }}"
short_name: "Savings ${{ github.event.inputs.environment_name }}"
- name: Recalculate SHA integrity
run: script/recalculate-integrity.sh
shell: bash
- name: Deploy Frontend
uses: azure/webapps-deploy@v2
with:
app-name: ${{ vars.APPSERVICENAME_FE }}
package: ./deploy