private void Deploy(FileLink zipLocation) { var zipFolder = new LocalFolder(zipLocation.Folder); var outputResource = FolderResource.From("_deploy_"); var outputFolder = zipFolder.Then(outputResource); try { Deploy(outputFolder); zipFolder.Delete(zipLocation.Name, strict: false); Log.Info("[deploy] Zipping to {Location:l}", zipLocation); ZipFile.CreateFromDirectory( outputFolder.Link.ToString(), zipLocation.ToString(), default(CompressionLevel), includeBaseDirectory: false); } finally { outputFolder.Delete(strict: false); Log.Info("[deploy] Deleted temporary folder {Output:l}", outputResource); } }