Skip to content

philips-software/antora-site-action

Repository files navigation

Antora Site GitHub Action

Docker Image Continuous Integration

License: MIT

GitHub action that can be used to generate the Antora site.

Supported Antora version: >= 3.0.0

Supported rendering plugins: asciidoctor-plantuml, asciidoctor-kroki

Supported extensions: @antora/lunr-extension

Parameters

The action accepts the following parameters:

  • antora_playbook -- that specifies the Antora playbook path within the repository
  • site_sources_path -- the path within $GITHUB_WORKSPACE from where to run the site generation
  • antora_generator -- Select antora generator for site
  • antora_custom_generator_dependencies -- Enable installing Antora dependencies when using a custom generator
  • antora_additional_arguments -- Pass customized arguments when running Antora

How to add this GitHub Action to your workflow

name: "Generate site using antora site action"
uses: philips-software/antora-site-action@latest
with:
    antora_playbook: antora-playbook.yml
    # optional path within the repo, defaults to ${{github.workspace}}
    site_sources_path: 'site-sources-folder'

How to enable Lunr-extension for adding documentation search index

Within your playbook file, define lunr-extension requirement

antora:
  extensions:
  - require: '@antora/lunr-extension'

Example: Complete site playbook example using extensions

site:
  title: Documentation Site
  start_page: index.adoc
content:
  sources:
    - url: ../../
      branches: HEAD
      start_path: documents/antora 
ui:
  bundle:
    url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable
    snapshot: true
  supplemental_files: supplemental_ui # Custom UI folder, if you have one
antora:
  extensions:
    - require: "@antora/lunr-extension"
asciidoc:
  attributes:
    kroki-fetch-diagram: true # Enable fetching diagrams (UML etc..)
  extensions:
    - "asciidoctor-kroki"

Changelog

See CHANGELOG for more info on what's been changed.

Maintainers

See MAINTAINERS

Contributing

Conventional Commits

antora-site-action uses semantic versioning and conventional commits.

Please refer to our CONTRIBUTING.md guide when you want to contribute to this project.

License

antora-site-action is licensed under the MIT license. See LICENSE file.