A GitHub Action that builds an Antora documentation site using Docker. This action runs Antora inside a Docker container to generate your documentation site.
This action:
- Builds a Docker image based on the official
antora/antora:latestimage - Runs
antora site.yml(orantora antora.yml) in your GitHub workspace - Generates the Antora site output in the
build/sitedirectory (or as configured in your Antora playbook)
This action does NOT:
- Directly generate a site compatible with GitHub Pages site generators
- Publish or deploy your site automatically
- Work as a "site generator" in GitHub Pages settings (it's a Docker-based action)
This is a Docker-based action, not a static site generator. If you're using GitHub Pages, you'll need to:
- Use this action to build your site
- Manually deploy the generated site files (typically from
build/site/) to your GitHub Pages branch - Or use a separate deployment action after this one runs
This action is suitable for:
- Building Antora sites in CI/CD pipelines
- Generating documentation that will be deployed elsewhere
- Workflows where you need full control over the build and deployment process
- An Antora playbook file (
site.ymlorantora.yml) in your repository root - Your Antora content sources properly configured in the playbook
name: Build Documentation
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Antora Site
uses: jsqu4re/antora_build@master
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: site
path: build/siteIf your playbook is named antora.yml instead of site.yml, you'll need to modify the entrypoint or use a different approach, as this action currently runs antora site.yml by default.
name: Build and Deploy Documentation
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Antora Site
uses: jsqu4re/antora_build@master
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/siteThis action currently has no configurable inputs. It runs antora site.yml in the GitHub workspace directory.
This action currently has no outputs. The generated site files are created in the build/site directory (or as configured in your Antora playbook).
- The action builds a Docker image from the included
Dockerfile - The Docker image is based on
antora/antora:latest - The container runs
antora site.ymlin your$GITHUB_WORKSPACEdirectory - Generated site files are created in the workspace and persist after the action completes
- Your repository must contain an Antora playbook file (
site.ymlby default) - All content sources referenced in your playbook must be accessible
- Sufficient permissions for the GitHub Actions runner to access your content sources
- Currently hardcoded to run
antora site.yml(cannot specify a different playbook file) - No configurable inputs for customizing the Antora build
- Docker-based execution may be slower than native Antora installation
- Not directly compatible with GitHub Pages "site generator" workflow
MIT License - see LICENSE file for details.