Skip to content

Commit

Permalink
refactor: Update Azure deployment workflow to pass staticSites_name a…
Browse files Browse the repository at this point in the history
…s a parameter
  • Loading branch information
Raj committed Aug 6, 2024
1 parent 8595048 commit 2f69213
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/azuredeploy.bicep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
staticSites_name=${{ vars.STATIC_WEB_APP_NAME }}
repositoryUrl='https://github.com/${{ github.repository }}'
branch='main'
repositoryToken='${{ secrets.GITHUB_TOKEN }}'
# Get Azure Static Web App deployment token
- name: Get Azure Static Web App deployment token
Expand Down
3 changes: 1 addition & 2 deletions infra/azuredeploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ param staticSites_name string = 'azure-static-web-apps-001'
param location string = 'East Asia'
param repositoryUrl string
param branch string = 'main'
param repositoryToken string

resource staticSite 'Microsoft.Web/staticSites@2023-01-01' = {
name: staticSites_name
Expand All @@ -14,6 +13,6 @@ resource staticSite 'Microsoft.Web/staticSites@2023-01-01' = {
properties: {
repositoryUrl: repositoryUrl
branch: branch
repositoryToken: repositoryToken
provider: 'GitHub'
}
}
20 changes: 18 additions & 2 deletions infra/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,40 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "18368054552692740450"
"templateHash": "3400584100582906428"
}
},
"parameters": {
"staticSites_name": {
"type": "string",
"defaultValue": "azure-static-web-apps-001"
},
"location": {
"type": "string",
"defaultValue": "East Asia"
},
"repositoryUrl": {
"type": "string"
},
"branch": {
"type": "string",
"defaultValue": "main"
}
},
"resources": [
{
"type": "Microsoft.Web/staticSites",
"apiVersion": "2023-01-01",
"name": "[parameters('staticSites_name')]",
"location": "East Asia",
"location": "[parameters('location')]",
"sku": {
"name": "Free",
"tier": "Free"
},
"properties": {
"repositoryUrl": "[parameters('repositoryUrl')]",
"branch": "[parameters('branch')]",
"provider": "GitHub"
}
}
]
Expand Down

0 comments on commit 2f69213

Please sign in to comment.