To use this action add the below config to .github/workflows/docs-build.yml
name: Build documentation
on:
push:
branches:
- main
- master
jobs:
deploy-docs:
runs-on: ubuntu-18.04
name: Build and deploy docs to Github pages
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create docs build directory
run: mkdir dist && chmod 777 dist
- name: Build docs
id: adocbuild
uses: equinor/asciidoctor-action@main
- name: Deploy docs to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./dist
Specify if entry point is other than default.
E.g if entry point is README.md, add the following to asciidoctor-action:
with:
entry_point: README
There is no need for a suffix in entry point.
Specify if docs folder is other than default.
E.g if docs folder is ./, add the following to asciidoctor-action step:
with:
docs_folder: ./
Please see docs.
You may run this locally by using run-locally.sh
.