Note: This feature might not be available on all editions of HelpNDoc. Check HelpNDoc's feature comparison page to learn more.

Each build can include an unlimited number of pre-build and post-build actions:

Build actions contain the following properties:

Access the "Build actions" panel

Each build can have an independent list of build actions. To access the "Build actions" panel:

Build action types

The following build actions can be created:

Build action type

Description

FTP(S) upload

Upload generated content to a FTP(S) or SFTP server. List of available properties:

  • Protocol: Protocol to use to connect to the remote server, either FTP(S) or SFTP
  • Server address: Domain name or IP address of the server
  • Server port: Port of the FTP server
  • Username: Username used to login to the server
  • Password: Password used to login to the server
  • Remote directory: Remote directory to upload to
  • Transfer more: Specify the transfer mode used for the connection (e.g. Text, Binary)
  • FTP(S) encryption: Determines how the FTP client starts the SSL negotiation (FTPS only)
  • FTP(S) passive mode: Whether or not to direct the server into a passive mode

HTTP Request

Perform a HTTP request to a remote URL. List of available properties:

  • URL to request: The remote URL to request
  • Request method: HTTP method used to perform the request (e.g. GET, POST...)
  • Content of the request: Request body
  • Content type header: Value added to the request's content-type header, specifying the type of the request's body

Samples:

Run program

Run an external program available on the computer. List of available properties:

  • File path: The path of the program to run
  • Arguments: Arguments to add to the program
  • Working directory: Full path of the current directory for the process. If not specified, it will be set to the current build's output directory
  • Expected return code: If provided, HelpNDoc checks the program's return value and displays an error if it is different from this value
  • Show window: Shows a window for GUI applications. Disable it for console applications to only capture the output without displaying a console window

Samples:

Run script

Run a script using the HelpNDoc API. List of available properties:

  • Script path: Specify the path of the external script file to execute. 
  • Script content: Specify the content of the script file.

Note: If both "Path" and "Content" fields are specified, the "Content" is used and the "Path" is ignored.

Samples:

Show message

Show a message during the generation process. List of available properties:

  • Modal window: Specify if the message is shown as a blocking dialog box (when checked), or as a discreet message in the build generation log
  • Message content: Textual content of the message to display

Samples:

Add a build action

To add a build action, click the "Add action" button, then choose the build action type in the list. The newly created build action is added a the bottom of the existing build action list.

Edit a build action

Once a build action is selected in the list:

Delete a build action

To delete a build action, select it then click the "Delete action" button.

Move a build action

Build actions are executed in order from top to bottom:

See also: Build actions samples