No longer able to deploy a static file to Azure App Service Slot

ee 21 Reputation points
2022-09-05T13:55:49.307+00:00

Hi, previously we were able to deploy a static file to an Azure App Service Slot using the following:

az webapp deploy --resource-group <group-name> --name <app-name> --slot uat --src-path test.txt --type static --target-path test.txt

Recently this stopped working and no file is deployed to the App Service Slot. There is no error message and it says it's succeeded (despite the missing file).

I'm not sure why it's no longer working and I'd appreciate any help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,959 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 18,851 Reputation points Microsoft Employee
    2022-09-07T09:16:07.757+00:00

    @ee Thank you for reaching out to Microsoft Q&A Apologize for the inconvenience caused by this.

    To reproduce this behavior, I have tried to upload a static file abc.txt to the webapp (without specifying the target path) using the below cmdlet

    az webapp deploy -g <ResourceGroupName> -n <WebappName> -s <slotName> --src-path "<pathoffileyouwanttoupload>" --target-path "<absoulte-pathtodestination>" --type static   
    

    File upload Operation got successful and when I logged into my web app kudu console, I am able to see the file under /home instead of /home/site/wwwroot as mentioned in the documentation

    238503-image.png

    I would request you to check whether the file is uploaded under /home from the kudu or try passing the absolute path to the --target-path property to the az webapp deploy cmdlet

    Feel free to reach back to me if you have any further questions on this.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful