PROVISION APP SERVICE WEBAPP #2
This file contains hidden or 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: PROVISION APP SERVICE WEBAPP | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| deploy_az_environment: | |
| type: environment | |
| description: Select the Azure deployment environment | |
| required: true | |
| default: 'development' | |
| env: | |
| RESOURCE-GROUP: apac-ic-prod | |
| LOCATION: indonesiacentral | |
| BICEP-TEMPLATE-FILE: infra/webapp-docker.bicep | |
| SUBSCRIPTION-ID: 29446bef-9ee0-4789-9951-69920a8bb4d2 | |
| WEBAPP-NAME: eshoponweb-container-webapp | |
| jobs: | |
| # Use Bicep to deploy infrastructure + Publish webapp | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: ${{inputs.deploy_az_environment}} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Login in your azure subscription using a service principal (credentials stored as GitHub Secret in repo) | |
| - name: Azure Login | |
| uses: azure/login@v2 | |
| with: | |
| creds: ${{ secrets.AZURE_CREDENTIALS }} | |
| # Deploy Azure WebApp using Bicep file | |
| - name: deploy | |
| uses: azure/arm-deploy@v2 | |
| with: | |
| scope: resourcegroup | |
| subscriptionId: ${{ env.SUBSCRIPTION-ID }} | |
| resourceGroupName: ${{ env.RESOURCE-GROUP }} | |
| template: ${{ env.BICEP-TEMPLATE-FILE }} | |
| parameters: 'location=${{ env.LOCATION }} appServiceWebAppName=${{ env.WEBAPP-NAME }}' | |
| failOnStdErr: false | |
| # # Publish website to Azure App Service using CLI (WebApp) | |
| # - name: Publish Website to WebApp | |
| # uses: Azure/cli@v2 | |
| # with: | |
| # inlineScript: | | |
| # az webapp deploy --name ${{ env.WEBAPP-NAME }} --resource-group ${{ env.RESOURCE-GROUP }} --src-path .net-app/app.zip --type zip |