Split deploy nuget package and iis website creation tasks

Is there anyway to split the deployment of a nuget package (for a website) and the iis website create/update tasks so we can place our own powershell tasks in the middle.

Our current process is running the powershell tasks after the deploy nuget packages task which encompasses the creation or update of the iis website in the task under the “iis website” section. Unfortunately if someone hits the site between the upgrade of the website and the powershell tasks running we end up with a race condition to do with the way a 3rd party library starts up making us redeploy the site again.

Hi Michael,

Thanks for getting in touch! You could certainly split up these processes using the package step without the IIS features then make use of IIS library steps to do the IIS portion of the deploy. (https://library.octopusdeploy.com/#!/listing)
But I think a simpler method might be to engage predeploy and deploy PowerShell scripts. If you look at the following link, you can see when these will happen inside a package step.
http://docs.octopusdeploy.com/display/OD/Package+deployment+feature+ordering

Hope this helps!
Vanessa

Thanks Vanessa, the package deployment feature ordering link was really helpful and should solve the issue.