Azure Resource Manager Provision and Deploy #1
This file contains 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: Azure Resource Manager Provision and Deploy | |
on: workflow_dispatch | |
jobs: | |
#====== Build and deploy ======# | |
provision_job: | |
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 | |
#parameters: ./infra/azuredeploy.params.json | |
deploymentMode: Incremental | |
# Logout of Azure | |
- name: Logout of Azure | |
run: | | |
az logout | |
#====== Build and deploy ======# | |
build_and_deploy_job: | |
runs-on: ubuntu-latest | |
name: "Build and Deploy" | |
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' | |