Skip to content

Publish Antora site #560

Publish Antora site

Publish Antora site #560

name: Publish Antora site
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build_antora:
concurrency:
group: build
runs-on: ubuntu-latest
steps:
- name: Checkout github-pages-source branch
uses: actions/checkout@v4
with:
ref: github-pages-source
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Delete /docs folder
run: npm run delete-docs
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: GameBrains
author_email:
message: 'Deleting docs directory'
new_branch: github-pages-source
- name: Checkout master branch
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Build with antora
run: npm run build
- name: Add nojekyll file
run: npm run nojekyll
- name: Add cname file
run: npm run add-cname
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: GameBrains
author_email:
message: 'New Antora build, triggered by change to a main branch in either this or a source repository.'
new_branch: github-pages-source
push: origin github-pages-source --set-upstream --force