Hide

YetaWF Documentation

Display
Print

Deploying To A ZIP File

Overview

Deploying to a ZIP file is normally done to create a complete site locally, which can then be deployed to a server using other tools. The DeploySite utility is necessary because Visual Studio Publish and dotnet publish are insufficient to deploy a YetaWF site. YetaWF uses symlinks heavily which can't be deployed by other tools.

Prepare Yaml File

A yaml file is used to define all the deployment attributes. The following is an example of a yaml file used to deploy to a ZIP file (named C:\Temp\FinalFolder\Site.zip in this example).

Deploy:
  Type: zip
  To: C:\Temp\FinalFolder\Site.zip
  BaseFolder: C:\Development\YetaWF
  From: C:\Temp\PublishOutput
  ConfigParm: Windows.Prod

The DeploySite yaml file has many more options, but these are sufficient to create a ZIP file containing the complete site. For information about available options see the topic DeploySite yaml File.

Run Visual Studio Publish or dotnet publish

The first step in deploying a site is to run Visual Studio Publish or dotnet publish. In this example, the solution file is located at C:\Development\YetaWF and the published (partial) site is created at C:\Temp\PublishOutput.

Run DeploySite

Softelvdm.DeploySite Backup yourfile.yaml

The DeploySite utility takes your partial deployed site (from C:\Temp\PublishOutput merged with C:\Development\YetaWF) and adds all JavaScript, CSS, config files, saving the result at C:\Temp\FinalFolder\Site.zip. This ZIP file contains the complete website, which can now be deployed to a server using your favorite tool. Or you could simply copy the file to the server and unzip it.