Prerequisites

You need a package.json in working_directory (the action installs dependencies unless install_dependencies is false).

  • pnpm version: when the project has pnpm-lock.yaml, this action runs pnpm/action-setup using the packageManager field in package.json (Corepack-style pin). Add that field (for example pnpm@10.33.0) so CI and local dev agree; omitting it still works—the setup action falls back to its default behavior.

  • Chaining with your own setup: if you already run pnpm/action-setup and actions/setup-node (with cache: pnpm or npm) plus pnpm install / npm ci before this action, pass setup_pnpm: false, setup_node: false, and install_dependencies: false so the action only runs Antora. If you only pre-install deps, use install_dependencies: false alone.

  • antora_mode (auto by default): if antora or @antora/cli is listed in package.json, the action runs pnpm exec antora / npx antora. Otherwise it uses pnpm dlx antora / npx antora without adding Antora as a dependency.

  • Recommended for reproducibility: add Antora as a devDependency and commit a lockfile:

{
  "devDependencies": {
    "antora": "^3.1"
  }
}

The antora package bundles both the CLI and site generator. Alternatively, install them separately:

{
  "devDependencies": {
    "@antora/cli": "^3.1",
    "@antora/site-generator": "^3.1"
  }
}

Commit a lockfile (package-lock.json or pnpm-lock.yaml) for reproducible builds.

Global installation is not supported.

Installing Antora globally (npm install -g) leads to unreproducible builds because:

  • latest resolves to whatever version exists at build time.

  • No lockfile means builds can break silently when new versions ship.

  • It conflicts with dependency-managed CI.

The Antora documentation recommends local installation: installing Antora locally makes it easier to manage the version of Antora and ensures that the version of Antora matches the version for which the playbook was made.