Quick start (GitHub Pages)
This is the recommended pattern: actions/upload-pages-artifact and actions/deploy-pages (official). Set output_dir to match your playbook’s output.dir.
name: Documentation
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Antora
id: antora
uses: antora-supplemental/antora-build-action@v2
with:
playbook: antora-playbook.yml
output_dir: build/site
- uses: actions/upload-pages-artifact@v3
with:
path: ${{ steps.antora.outputs.site-path }}
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
uses: actions/deploy-pages@v4
For more detail on permissions and alternatives, see GitHub Pages (official actions) and GitHub Pages (peaceiris).