Ended up using home\site\wwwroot as deploy location, keeping the write-protection and rewriting the application to use Azure Blob storage to solve my need to write to files.
How to best YML/Task deploy Web Job to \home\site\jobs instead of home\site\wwwroot
We have a Web Job I need to deploy and run under \home\site\jobs in an App Service. We allready deploy the website itself via .yml-files with tasks (AzureRmWebAppDeployment@4).
The reason that I cannot deploy under home\site\wwwroot is that the Web Job needs to write to files which is not allowed since we use RUN_FROM_PACKAGE=1 on the website itself.
I have read several approaches to this (FTP-tasks and complicated powershell-scripts), but I imagine there is some more elegant way to accomplish this?
The task is simple: Take a .zip-file that is already present in the ArtifactStagingDirectory and unzip it under the folder \home\site\jobs\triggered\<jobname> (and start the job if it does not autostart with a jobs.settings file).