Skip to content

Commit de78ca3

Browse files
authored
Fix Azure deployment workflow and artifact handling
Updated deployment workflow for Azure Web App to fix missing 'with' for .NET setup, specify download path for artifacts, and point package to the downloaded artifact.
1 parent b66a12f commit de78ca3

1 file changed

Lines changed: 23 additions & 19 deletions

File tree

.github/workflows/031-build-deploy-webapp-to-azure.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Set up .NET Core
2525
uses: actions/setup-dotnet@v3
26-
with: # ✅ FIX: missing "with"
26+
with:
2727
dotnet-version: ${{ env.DOTNET_VERSION }}
2828

2929
- name: Set up dependency caching for faster builds
@@ -46,24 +46,28 @@ jobs:
4646
name: dotnet-app # ✅ avoid dot in name
4747
path: ./publish
4848

49-
deploy:
50-
runs-on: ubuntu-latest
51-
needs: build
49+
deploy:
50+
runs-on: ubuntu-latest
51+
needs: build
5252

53-
environment:
54-
name: Development
55-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
53+
environment:
54+
name: Development
55+
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
5656

57-
steps:
58-
- name: Download artifact from build job
59-
uses: actions/download-artifact@v4
60-
with:
61-
name: dotnet-app
57+
steps:
58+
- name: Download artifact from build job
59+
uses: actions/download-artifact@v4
60+
with:
61+
name: dotnet-app
62+
path: ./app # ✅ FIX: explicit download location
6263

63-
- name: Deploy to Azure Web App
64-
id: deploy-to-webapp
65-
uses: azure/webapps-deploy@v3
66-
with:
67-
app-name: ${{ env.AZURE_WEBAPP_NAME }}
68-
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
69-
package: .
64+
- name: Verify downloaded files (debug)
65+
run: ls -R ./app # ✅ helps confirm files exist
66+
67+
- name: Deploy to Azure Web App
68+
id: deploy-to-webapp
69+
uses: azure/webapps-deploy@v3
70+
with:
71+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
72+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
73+
package: ./app # ✅ FIX: point to downloaded artifact

0 commit comments

Comments
 (0)