Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI job says successful but wwwroot remains empty #161

Open
slombardo opened this issue Oct 8, 2024 · 1 comment
Open

CI job says successful but wwwroot remains empty #161

slombardo opened this issue Oct 8, 2024 · 1 comment

Comments

@slombardo
Copy link

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/[email protected]
        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

@slombardo
Copy link
Author

Here is the log of the deploy, and it says everything is ok, but still no files:

2024-10-08T16:24:17.3186593Z,Updating submodules.,30d95f4b-e231-4b28-a0e6-40b87ae0334f,0
2024-10-08T16:24:17.3627094Z,Preparing deployment for commit id '3e7b11f3ad'.,6bfae296-0974-4633-98e3-b48a8196ffe9,0
2024-10-08T16:24:17.5345858Z,Running build. Project type: OneDeploy,73f660b7-5faa-4a75-8aac-69be84d9a555,0
2024-10-08T16:24:17.6296785Z,Copying the manifest,ac4f49aa-4524-44cd-9a06-660427c3a010,0
2024-10-08T16:24:17.7845909Z,Clean deploying to C:\home\site\wwwroot,7f0f88dd-baed-4d0a-a63e-988bc1dce8d6,0
2024-10-08T16:24:17.9105846Z,Generating deployment script.,40677e26-92a2-4448-bcbf-6e6af647b371,0
	2024-10-08T16:24:17.9564691Z,Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "C:\local\Temp\zipdeploy\extracted" -o "C:\home\site\deployments\tools" --basic --sitePath "C:\local\Temp\zipdeploy\extracted\MyProject\MyProject.csproj"').,,0
2024-10-08T16:24:18.0033442Z,Running deployment command...,a71a2450-69f5-4182-ab46-81dc098e7493,0
	2024-10-08T16:24:18.0033442Z,Command: "C:\home\site\deployments\tools\deploy.cmd",,0
	2024-10-08T16:24:18.7727275Z,Handling Basic Web Site deployment.,,0
	2024-10-08T16:24:19.2727380Z,Creating app_offline.htm,,0
	2024-10-08T16:24:19.3027378Z,KuduSync.NET from: 'C:\local\Temp\zipdeploy\extracted\MyProject\MyProject.csproj' to: 'C:\home\site\wwwroot',,0
	2024-10-08T16:24:19.3327388Z,Deleting app_offline.htm,,0
	2024-10-08T16:24:19.3827403Z,Finished successfully.,,0
2024-10-08T16:24:19.4727440Z,Build completed succesfully.,433bf05a-4714-4044-bee0-bf042910752c,0
2024-10-08T16:24:19.6127420Z,Running post deployment command(s)...,d40f7fd2-e5c4-48fb-bd02-7cd7709e2c8d,0
2024-10-08T16:24:19.9565022Z,Requesting site restart,1bbb288c-9528-43e5-95fa-bec7c5ad0eb1,0
2024-10-08T16:24:20.0346279Z,Requesting site restart. Attempt #1,231fa49d-a40c-4402-801c-739015217ed8,0
2024-10-08T16:24:20.4721346Z,Successfully requested a restart. Attempt #1,e89a0409-55a8-4830-a5c1-496f9d3aa4a5,0
2024-10-08T16:24:20.5346370Z,Deployment successful.,e5542a82-94cf-45f1-b359-3038c4a7352d,0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant