I have a project in VS Team Services git repository with the following structure (simplified):
All typescript and sass files are built with gulp into appropriate directory inside wwwroot.
What I'd like to do but can't find how, push only wwwroot
directory to Azure Website instead of entire project.
If not possible, what are alternatives?
There are two ways you could do this
The Easier Way
You can add a custom deployment setting that sets your wwwroot directory as the root directory for your site.
The bottom part of this post describes how to do this: http://www.zainrizvi.me/2015/10/13/deploy-statically-generated-sites-to-azure-web-apps/
Here's the relevant snippet:
Add a .deployment file to the root folder of your code and paste the below inside:
[config] project = wwwroot
The Harder Way
If you really wanted to just deploy the wwwroot folder, you could use Custom Deployment Scripts to deploy just the desired files to your site.
This involves creating a custom script that executes every time you deploy your site, and in that script you'll tell it to copy just the wwwroot folder over.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With