We are trying to simplify the publishing process by utilizing Web Deploy through VS2010. We want to be able to quickly rollback any broken releases, so we create folders for each release:
- C:\www\1.0.0
- C:\www\1.1.0
As of now, I publish the site locally, copy the files to the new release folder on our server, and then manually update the site's physical path to the new folder in IIS. Because the site points to a specific release's folder, I am unable to use web deploy on that site as the result would overwrite the existing files.
My solution to the overwrite problem was to create a deployment site that points to root folder (C:\www) and use web deploy to create the new release. The next step is to update the physical path of the site, but I'm unable to find a proper way to accomplish this. I'm aware of executing a command in the post-build event, but I'm getting a little lost with the web deploy documentation since the verb options are to sync, dump and delete.
When the publish is complete, I just need the IIS site to point to the new physical path. Is this possible? I'm open to alternative options (like publish locally then execute a batch file).
If it's not already, then I'd recommend putting your project in source control and forgetting about different deployment targets based on version. Keep a single deployment target and if something in that build is broken then go back to the previous release in source control and redeploy that. That gets you out of the messy situation with multiple folders and having to modify your web root.