Deploy multiple IIS Web Sites from a single package

We have a number of IIS web sites which supposed to be deployed together and come from the build process as a single ZIP package where each site is a subfolder inside ZIP. Octopus requires each IIS site deployment to be separate step. (BTW, is this true? Can we deploy multiple sites as actions within the same step?) That step requires the package to be specified. So is Octopus smart enough to download and unpack the package only once, so that after the first site is deployed others reuse the same unpacked package folder only pointing to a different subfolder within it?

Thank you!

Hi Konstantine,

To accomodate your scenario you can’t use the built-in deploy package step as it has to download the package, so in your case Octopus would download the package 3 times into 3 different folders. Now, what you can do is the following:

1. Add a deploy package step to your project and configure it with your package (don't enable any IIS related features in the step)
2. Add a project variable and set the value to `#{Octopus.Action[NameOfTheStepAbove].Output.Package.InstallationDirectoryPath}`
3. Add a [Create Virtual Directory step]( (or [Create Application]( or [Create Website]( for each of your web sites in your package
  3a. Set the Physical Path to `#{VariableNameCreatedAbove}\NameOfSubFolderInPackage`
  3b. Configure the other settings as appropriate

Hope that helps!

Thank you and best regards,