Use this template to add Antora docs build and GitHub Pages deploy to a repository.
-
Build: Antora runs on push/PR when
docs/**,antora-playbook.yml, or the workflow file change. -
Deploy: On
main, the built site is deployed to GitHub Pages (branchgh-pagesor Pages environment). -
Extension refresh: Workflow can be triggered by
repository_dispatch(e.g. when a shared UI bundle updates).
-
Copy
.github/workflows/docs.ymlinto your repo’s.github/workflows/. -
Copy
antora-playbook.ymlto your repo root. -
In the playbook, set
site.title,site.url, andstart_pageto match your project. -
Ensure you have a
docs/folder with anantora.ymland at least one module (e.g.docs/modules/ROOT/pages/index.adoc). -
In the repo: Settings → Pages: set source to GitHub Actions (or Deploy from a branch with branch
gh-pagesif you use that variant).
-
Node 20 and pnpm (workflow installs pnpm).
-
Repo Settings → Pages: either Deploy from a branch (branch
gh-pages, root) or GitHub Actions (this template usesupload-pages-artifact+deploy-pages; for Actions-based deployment the source must be GitHub Actions).
If your playbook pulls from other private repos in the org, GITHUB_TOKEN is not enough to clone them. Add a PAT (e.g. ANTORA_READ_TOKEN) and uncomment the "Configure git for private content sources" step in the workflow. Full explanation: docs/modules/publishing/pages/antora-deployment.adoc — see "Private repos: GITHUB_TOKEN vs PAT".
-
In Settings → Pages, set Custom domain to your domain.
-
To add a
CNAMEfile to the site root, use a supplemental UI and list the file insupplemental-ui/ui.ymlunderstatic_files.
Full deployment guide (including private repos and PAT): antora-deployment.adoc in the devcentr repo.