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.

    链接地址: http://www.djcxy.com/p/88562.html

    上一篇: 比cell2mat快

    下一篇: VS团队服务和Azure持续交付子目录