Using the Deployment Wizard

You can use the Deployment Wizard to deploy a project directly to the host servers or to create a deployment script that you can run whenever you want. Deployment scripts offer the benefit that they can be modified to do additional tasks during the course of deployment (for example, file compression or custom logging).

Deploying directly

When you deploy a project directly, you are copying the files to the host server(s) at the time of deployment.

Note To deploy a project directly:
  1. Open the project you want to deploy in the Projects tab.
  2. From the Projects menu, choose Deployment Wizard to see the Deployment Script Wizard window.

  3. Click Deploy Directly then click Next.
  4. To deploy to a local or network path:
  5. To deploy to a remote server:
Note To view the results of a deployment:
  1. From the View menu, choose Results (Shift+CTRL+L) to see the Results window.
  2. Click the Deployment tab at the bottom of the Results window.

    The Results window tells you the status for each file in your project along with the amount of time the deployment took.

    Note You can also view the results of a deployment by looking at the Deployment.log file in the HomeSite 4.5 directory.

Using deployment scripts

You can create a deployment script that can be run at any time. Deployment scripts are based on the VTOM model and can be generated in either JScript or VBScript (see ../../scripting_the_visual_tools_object_model/vtom.htmScripting the Visual Tools Object Model/a for more information on VTOM). The most powerful benefit of scripts is that, once they have been generated, they can be modified with custom code and saved.

There are three types of scripts that can be generated:

Choosing a deployment script

The following section gives you some information about choosing the type of deployment script that will work best for you.

The Project-wide Upload Script is the most inflexible script. It works well in the case where you do not want to add custom code during the processing of deployment. You can still add custom code before and after deployment, however, with the Project-wide Upload Script, you are depending on HomeSite's deployment engine to perform all of the deployment tasks for you.

The File-by-File Deployment Script offers somewhat more flexibility. After generating a File-by-File Deployment Script, you can edit the script to deploy only a specified set of files. You can also add custom code during the course of deployment. The File-by-File Deployment Script is dependent, however, on the files existing in the project. If a file is included in the script but deleted from the project, then the script will run but the project will be out of date.

The Project Element Iterator Script is the most powerful script because it is not tied to specific servers or folders. This means that the script will continue to run regardless of project editing. The Project Element Iterator Script dynamically traverses the project folders runtime to appropriate the files to upload. When using a Project Element Iterator Script, the only thing you cannot change for a project is its name.

Working with deployment scripts

Once you have a created a script, you can open and edit it, run it, remove it, or change its properties.

Note To create a deployment script:
  1. Open the project for which you want to generate a script.
  2. Click the Deploy Project button or choose Project > Deployment Wizard to see the Deployment Wizard window.
  3. Click Generate Deployment Script then click Next.
  4. Enter a name for the script in the Deployment Task Name box.
  5. Choose the language for your script, VBScript or JScript, from the Script Language Options.
  6. A pathname based on the project name is automatically entered for the script in the Save Script to File box. You can change it by entering a new pathname or clicking the Browse button to use the Save As dialog box.
  7. If you want to see the script in the HomeSite Editor window, leave Open script in editor after generation selected.
  8. Click Next.
  9. Choose the type of script you want to generate-Project Element Iterator Script, File-by-File Deployment Script, Project-wide Upload Script-and click Next.
  10. To deploy to a local or network path:
  11. To deploy to a remote server:
Note To open a deployment script for editing:
  1. Expand Deployment Scripts.
  2. Right-click the script you would like to open for editing and choose Open Script from the menu.

    The script is opened in the Editor window. You can customize the script by editing it, then saving it.

Note To run a deployment script:
  1. Expand Deployment Scripts.
  2. Right-click the script you want to run and choose Run Script from the menu.

    The Results window opens and informs you of the status of your deployment.

Note To remove a deployment script:
  1. Expand Deployment Scripts.
  2. Right-click the script you want to remove and choose Remove Script from the menu.

    You are asked to confirm that you want the script deleted.

  3. Click Yes.

    The script is removed from the Deployment Scripts list.

Note To edit a script's properties:
  1. Expand Deployment Scripts.
  2. Right-click the script whose properties you want to edit and choose Properties from the menu.
    Note The only property you can edit for a script is its description.

  3. Enter a new description for the script and click OK.