简体   繁体   中英

VS Team Services and Azure Continuous delivery subdirectory

I have a project in VS Team Services git repository with the following structure (simplified):

  • /
    • scripts (for typescript)
    • styles (for sass)
    • wwwroot (public directory with images, css, js...)
    • ...

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM