File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,14 +99,35 @@ jobs:
9999 tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_A991E240EF384A70891F3517360891DE }}
100100 subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_2276E1689CF5423891BDA354FAC31928 }}
101101
102+ - name : Get App Service resource group
103+ id : get-rg
104+ run : |
105+ RESOURCE_GROUP=$(az webapp list --query "[?name=='Maya'].resourceGroup" -o tsv | head -1)
106+ if [ -z "$RESOURCE_GROUP" ]; then
107+ RESOURCE_GROUP=$(az resource list --name Maya --resource-type "Microsoft.Web/sites" --query "[0].resourceGroup" -o tsv)
108+ fi
109+ if [ -z "$RESOURCE_GROUP" ]; then
110+ echo "Error: Could not determine resource group for app 'Maya'"
111+ exit 1
112+ fi
113+ echo "RESOURCE_GROUP=$RESOURCE_GROUP" >> $GITHUB_OUTPUT
114+ echo "Resource Group: $RESOURCE_GROUP"
115+
116+ - name : Configure App Service for build
117+ run : |
118+ # Set app setting to enable build during deployment (Oryx will install node_modules)
119+ az webapp config appsettings set \
120+ --name Maya \
121+ --resource-group "${{ steps.get-rg.outputs.RESOURCE_GROUP }}" \
122+ --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true \
123+ --output none
124+ echo "✅ Configured SCM_DO_BUILD_DURING_DEPLOYMENT=true"
125+
102126 - name : Deploy using GitHub Action
103127 uses : azure/webapps-deploy@v3
104128 id : deploy-to-webapp
105129 with :
106130 app-name : ' Maya'
107131 slot-name : ' Production'
108132 package : . # Point to the current directory where artifact was downloaded
109- # Explicitly set the app setting as an input to the action for clarity and reliability
110- app-settings : |
111- SCM_DO_BUILD_DURING_DEPLOYMENT=true
112133
You can’t perform that action at this time.
0 commit comments