-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.47 KB
/
azuredeploy.arm.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
name: Azure Resource Manager Provision and Deploy
on: workflow_dispatch
jobs:
#====== Provision ======#
provision:
name: "Provision"
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
# Login to Azure
- name: Login to Azure
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Deploy ARM template
- name: Deploy ARM Template
uses: azure/arm-deploy@v2
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.HELLOWORLD_RESOURCE_GROUP_NAME }}
template: ./infra/azuredeploy.json
deploymentMode: Incremental
# Logout of Azure
- name: Logout of Azure
run: |
az logout
#====== Build and deploy ======#
build_and_deploy:
runs-on: ubuntu-latest
name: "Build and Deploy"
needs: provision
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
# Deploy to Azure Static Web Apps
- name: Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_DEPLOY_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
app_location: '/src/AspNet.Core.Blazor.WebAssembly'
output_location: 'wwwroot'