Deploy static site to Azure WebSite
Hello,
I have a node.js project that produces a static website using a grunt task. I have an appveyor.yml file set up that uses a grunt task to build the site then packages up the site in a zip folder and deploys it to the Azure Website via FTP.
The problem is that the only way I can deploy the site to Azure seems to be in a zip folder, but I have no way of unzipping it when it hits the Azure website. How would you recommend I deploy a static site to Azure if the project is not a .net project? Is there a way I can deploy a directory via FTP without zipping, or unzip the folder in Azure, or somehow generate a cloud project artifact? I'm not sure how to accomplish this in a non .Net project.
Thanks,
David
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 11 Feb, 2015 05:30 PM
Hi David,
You can use
applicationfield instead ofartifactto unpack provided archive during deployment.However, as it is Azure website I'd recommend using "Web Deploy" provider as it's faster because deploying changes only and it can do full sync by removing old files/folders. Web Deploy provider perfectly works with zip packages.
2 Posted by Sendelbach, Dav... on 11 Feb, 2015 05:57 PM
Oh, I didn’t realize I could just point it at the zip file. That worked perfectly. Sorry, this was probably just due to my inexperience with continuous deployment.
Thanks for the help.
3 Posted by Konstantin on 15 Feb, 2015 11:31 AM
You may also want to consider deploying your static website to GitHub Pages which is a free CDN-based website hosting. Here is an example: https://github.com/kriasoft/static-site-starter
4 Posted by Phil Dye on 29 Feb, 2016 03:34 PM
Can someone expand a bit more on how to do this? I have a static website project that builds as far as running a grunt task to generate CSS/JS/etc, but not sure how I set this up to deploy to Azure? Do I need to zip the output, or can I not just use the Web Deploy provider as-is to transfer the output?
Support Staff 5 Posted by Feodor Fitsner on 29 Feb, 2016 06:25 PM
You can use
7z.exeto pack your website to a zip. Then push archive to artifacts: http://www.appveyor.com/docs/packaging-artifactsUsing Web Deploy provider your can deploy to Azure websites from both regular zip archive and Web Deploy package artifacts: http://www.appveyor.com/docs/deployment/web-deploy
6 Posted by Phil Dye on 01 Mar, 2016 09:16 AM
Thanks; I hadn't appreciated that the Web Deploy provider will just take an arbitrary zip file and automagically deploy it (I'd assumed it would need a package built by a MSDeploy step).
So, I'm using a grunt-contrib-compress task to build a zip file, push that as an artifact, and WebDeploy does it's thing.
Thanks!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:04 AM.