generateCICD

About This Task

This task scaffolds a ready-to-use CI/CD pipeline that builds your documentation with dtcw4 and publishes it. The generated pipeline reflects the v4 architecture — it bootstraps docToolchain with the dtcw4 wrapper, with no Gradle and no legacy Docker image.

Two providers are supported:

Provider File written Publishes to

github (default)

.github/workflows/docs.yml

GitHub Pages

gitlab

.gitlab-ci.yml

GitLab Pages

Setup and Configuration

# GitHub Actions (default)
./dtcw4 local generateCICD

# or explicitly choose a provider
./dtcw4 local generateCICD --provider gitlab

The task refuses to overwrite an existing pipeline file. Pass --force to replace it:

./dtcw4 local generateCICD --provider github --force

The generated pipeline:

  • installs Temurin Java 25,

  • caches ~/.doctoolchain between runs,

  • downloads dtcw4, installs docToolchain, and runs generateSite,

  • uploads the microsite from build/microsite/output to Pages.

After Generating

  1. Commit the generated file.

  2. GitHub: enable Pages under Settings > Pages > Source: GitHub Actions.

  3. GitLab: the pages job publishes automatically on the default branch.

Further Reading and Resources

Source

View the source of this task: scripts/generateCICD.groovy on GitHub