# How to deploy your site with the forrestbot via a cron job

This How-To describes the deployment of a forrest documentation with the help of the forrestbot. This deployment task will then be automated via a cron tab.

Intended Audience

Users who need to deploy a forrest documentation on a regular basis and want to automate this task.

Purpose

If you are administrate a forrest documentation and have to deploy it on a regular basis the process is sometimes quite time consuming. One feature of forrest is the forrestbot. This bot can build the documentation and later on deploy it to a server of your choice. You will learn how to use this forrestbot and how to mae programmed deployments.

Prerequisites

- Understand how the forrestbot works in following the Forrestbot document.

Steps

# Create your project's main sitemap.xmap

In the Forrestbot document you have seen an example of a buildfile for a cvs source. We will now use a local source.

    <project name="mysampleproject" default="main" >
    	<property name="notify.email.host" value="smtp.myhost.com"/>
    	<property name="notify.email.to" value="me@domain.com"/>
    	<property name="notify.administrator" value="Your Name &lt;me@domain.com>"/>
    	<property name="getsrc.local.root-dir" value="/path/to/project/dir"/>
    	<property name="deploy.scp.dest" value="user@deploy-host:/path/to/project/www-docs"/>

    	<!-- ant targets -->
    	<target name="notify" depends="notify.local, notify.email"/>
    	<target name="deploy" depends="deploy.scp"/>
    	<target name="getsrc" depends="getsrc.local"/>

    	<!-- assumes FORREST_HOME has been set as an environment variable -->
    	<property environment="env"/>
    	<import file="${env.FORREST_HOME}/../forrestbot/core/forrestbot.xml"/>
    </project>

Feedback and further development of this How-To

Please provide feedback about this document via the mailing lists.