In package com.eden.orchid.api.publication
since: v1.0.0 public abstract
An OrchidPublisher is a task that gets run when the Orchid site is done building and is ready to be deployed, such as
uploading the site's files to a remote server, or optimizing the resulting files. Publication can be run with the
deploy OrchidTask or OrchidCommand . Publication can optionally be run as a dry deploy, where each
OrchidPublisher is loaded and its options extracted and validated to ensure it is set up correctly, but the actual
publish() method is never called.
deploy is run as a command, the default behavior is to do a dry deploy. This can be configured with the
command parameter. In contrast, when
deploy is run as a task, it is a full deploy. This can be configured with the
dryDeploy command-line flag. In addition, individual stages of the publication can be individually run as a dry run
or disabled completely.
OrchidPublishers are prioritized, and they are executed in order from highest priority to low. This means that Publishers implement a complete post-processing pipeline rather than just deploying code, and can be reliably used to do any kind of post-processing or deployment on the generated site. Any failed validation or exceptions thrown by a publisher terminate the entire publication phase.
value="Manually set the order in which this publisher executes")
OrchidPublisher(OrchidContext context, String type, int priority)public
A callback to check if this OrchidPublisher is valid and ready to publish. This is called during dry runs so users can see whether the publisher is configured correctly.
void publish()abstract public
A callback to run the publication step.
void exists(String value, String message)protected
void exists(Object value, String message)protected