Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 790
Jaka Konda Avatar asked Nov 03 '15 09:11

Jaka Konda


1 Answers

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.

like image 161
Zain Rizvi Avatar answered Oct 01 '22 06:10

Zain Rizvi