Azure / Azure/actions-workflow-samples

CI job says successful but wwwroot remains empty

Open
#161 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Pug
Stars
511
Forks
657
PR merge metrics
No merged PRs in 30d

Description

I am using the following yml file:
```
name: Build and deploy ASP.NET app to Azure Web App

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: windows-latest

steps:
# Checkout the repository
- uses: actions/checkout@v4

# Install Visual Studio Build Tools with Web development components
- name: 'Install Visual Studio Build Tools'
run: |
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.WebBuildTools --includeRecommended --includeOptional" --ignore-checksums -y
shell: powershell

# Restore NuGet packages
- name: 'Restore NuGet packages'
run: |
nuget restore "My.sln"
shell: powershell

# Build and publish the project
- name: 'Build and publish the project'
run: |
$msbuild = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
& $msbuild "MyProject/MyProject.csproj" `
/p:Configuration=Release `
/t:Package /p:PackageTempRootDir=..\publish
shell: powershell

# look for the publish output folder - works
- name: 'List directories to find publish output'
run: |
Get-ChildItem -Path "publish/PackageTmp" -Directory
shell: powershell

# This works as expected
- name: Upload Artifact
uses: actions/upload-artifact@v4.0.0
with:
name: published_webapp
path: './publish/PackageTmp'

# Deploy to Azure Web App using publish profile - says successful but wwwroot is empty
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3
with:
app-name: 'MySiteName'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: '.'
# I've also tried:
# package: './publish'
# package: './[project dir]'
```

Yet no matter what I do I wwwroot remains empty. Logs all say it was successfully deployed with no errors

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.