In the previous post about Creating Windows Store Apps using Composite C1 CMS, I used git to deploy my site. If you deployed from the gallery you can also benefit from this post about creating a local staging site.
When a push to the Github repository occur, it will redeploy and erasing all changes made on the Azure Website. I will show you how you can get a local copy and do staging from local IIS Site, using IIS Express.
Getting a local copy
Assuming you figure out in the previous post how to install a package in C1, go ahead and install the Composite.Tools.XmlBasedSiteBackup from Composite.Tools.
When C1 has installed the package and refreshed the console, you will see XML-Based Site Backup in the system perspective. Double tap this, and press "Create Backup Now". You can download the zip file when it is complete.
Extract the zip file, to some folder with a combined path length less than 70. I extracted it to, C:\dev2\c1gitmagazine.azurewebsites.net that now contains all the files from the website.
Using WebMatrix 3
With the new WebMatrix 3 release, it is easy to create the staging site and you do not even have to use visual studio. First open WebMatrix 3 and open a site from folder, selecting the newly extracted folder.
When you have opened the site, you can run the site locally, by pressing Run.
At this point, the site is running locally, you can log into your console and start changing the content. When you are done with this, we will move the site to Azure again using the Publish Button in WebMatrix.
WebMatrix will take care of the most and you just have to press continue a few times. I used the Choose an existing site from Windows Azure and selected the site that I deployed previously from Github. From the management Portal I disconnected the site from Github, such any changes to Github would not get deployed to the site.
Now I can change my site locally and publish it to azure websites from WebMatrix when I feel like publishing it. Composite C1 do include packages for Blogs, Galleries and much more. No reason for not trying it out when it is this easy.
In this post and the previously, it really surprised me how easy things have become for publishing and integrating with Azure Websites. It is really the way to go if you need something fast out there for demonstration purposes, and then it is free if you stay within the limits. Thumbs up Microsoft.