Skip to content

Commit 6e8bdeb

Browse files
committed
Switch Azure deployment from webapps-deploy action to az CLI zip deploy with explicit startup config
1 parent 6c59fe6 commit 6e8bdeb

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/azure_stock-dashboard-python.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,19 @@ jobs:
6767
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_298CA90AA01E48B1ADA79A4DC7FA91B6 }}
6868
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_EB6A5C6853294E129D054A838DBC3358 }}
6969

70+
- name: 'Zip artifact for deployment'
71+
run: zip -r app.zip . -x "*.git*" -x "antenv/*"
72+
7073
- name: 'Deploy to Azure Web App'
71-
uses: azure/webapps-deploy@v3
72-
id: deploy-to-webapp
73-
with:
74-
app-name: 'stock-dashboard-python'
75-
slot-name: 'Production'
76-
resource-group-name: ${{ secrets.AZUREAPPSERVICE_RESOURCEGROUP }}
77-
startup-command: 'gunicorn --bind=0.0.0.0 --timeout 600 app:server'
74+
run: |
75+
az webapp deploy \
76+
--resource-group ${{ secrets.AZUREAPPSERVICE_RESOURCEGROUP }} \
77+
--name stock-dashboard-python \
78+
--src-path app.zip \
79+
--type zip \
80+
--async false
81+
az webapp config set \
82+
--resource-group ${{ secrets.AZUREAPPSERVICE_RESOURCEGROUP }} \
83+
--name stock-dashboard-python \
84+
--startup-file "gunicorn --bind=0.0.0.0 --timeout 600 app:server"
7885

0 commit comments

Comments
 (0)