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 runspnpm/action-setupusing thepackageManagerfield inpackage.json(Corepack-style pin). Add that field (for examplepnpm@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-setupandactions/setup-node(withcache: pnpmornpm) pluspnpm install/npm cibefore this action, passsetup_pnpm: false,setup_node: false, andinstall_dependencies: falseso the action only runs Antora. If you only pre-install deps, useinstall_dependencies: falsealone. -
antora_mode(autoby default): ifantoraor@antora/cliis listed inpackage.json, the action runspnpm exec antora/npx antora. Otherwise it usespnpm dlx antora/npx antorawithout 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 (
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. |