Publish Antora site #593
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |