Skip to content

flowchart redirect to github.com #245

flowchart redirect to github.com

flowchart redirect to github.com #245

# Many thanks to James Read:
# https://blog.jread.com/auto-build-and-host-pretty-html-documentation-using-asciidoc-github-pages-github-actions-758a03f93d7d
name: Build asciidocs
on:
push:
branches:
- master
jobs:
adoc_build:
runs-on: ubuntu-latest
name: Asciidoctoring the docs to pretty HTML!
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get build container
id: adocbuild
uses: avattathil/asciidoctor-action@4feb0f72ff1096f854daa6bb0b2456c2ecab27f9
with:
# If gitignore includes HTML files, it won't add our newly-generated HTML
# to the gh-pages branch.
program: "echo '!index.html' >> training/.gitignore && asciidoctor -o training/index.html training/rest_training.adoc && mkdir -p training2 && asciidoctor -o training2/index.html training/test.adoc"
- name: Deploy to github pages.
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Cannot publish to master from master, otherwise generated files would end up alongside
# their source files. The repo is configured to publish from gh-pages branch
# (Settings -> Pages).
publish_branch: gh-pages
# Publish the whole tree. The default is /public.
publish_dir: ./
# This is the default. Flush gh-pages branch before publishing.
keep_files: false
# Keep producing an index.html from README.md please.
enable_jekyll: true
# There is no point in keeping the history of the gh-pages branch.
# If you switch to gh-pages locally, you'll later have a problem merging.
# Delete your local branch to unblock.
force_orphan: true