In package com.eden.orchid.api.publication
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. When
deploy is run as a command, the default behavior is to do a dry deploy. This can be configured with the
dry 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.
public <init>(com.eden.orchid.api.OrchidContext, kotlin.String, kotlin.Int)
public abstract publish(): Unit
A callback to run the publication step.
- No parameters
public open validate(): Boolean
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.
- No parameters