I recently started using Gulp.js to pack all my CSS and JavaScript into separate files, which I then include in my web application. My web application is written in Python (using Flask ).
I obviously don't want to track the output CSS and JS Gulp files with git (since they create the output files).
I am deploying my site to Azure Websites using push to deploy. That is, I just run git push azure master , and Azure automatically detects that I am using Python, configure virtualenv , install pip dependencies, and so on. This article describes how to install this .
This process works fine, but now that I have started using Gulp, I want to make sure that the related JavaScript and CSS files are also created on the server side every time the website is deployed.
In addition, in the future, I would like Azure to run all tests during deployment and only successfully deploy if they all pass.
Unfortunately, I have yet to find a satisfactory solution for this workflow, as I cannot add custom steps for Azure's automatic deployment.
I tried writing a custom deployment script using Kudu (as suggested by this blog post ), but it turns off all the automatic steps that Azure usually performs; running azure site deploymentscript --python only creates a very simple Kudu deployment file that does not handle reading in the web.config , configuring virtualenv or installing dependencies. I did not find documentation on how to do this myself; I use the standard Azure automatic deployment script (which gets the generated server side when I click on the code, so I cannot access it myself), because otherwise virtualenv and pip dependencies will not be processed.
Is there any workaround available so that I can configure my script deployment (e.g. run Gulp) when Flask is deployed correctly?
source share