From 5c3bd02b0606fed98e89c0c905bc18e9e81b4741 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Wed, 9 Oct 2019 12:51:37 -0700 Subject: [PATCH] Asciidoctor conversion first step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Shell script using pandoc to convert from .md to .adoc * Initial OmniSpec.adoc * build.gradle to render PDF & HTML via Github actions * .github/workflows/gradle.yml adoc spec: cleanup metadata, note, at TOC OmniSpec.adoc: Minor syntax cleanup Gradle build: move doc output to build/doc Simplify to just Github Actions/gradle rendering * Remove the converted README/spec (that’s in another PR now) * Remove the conversion Bash script * Change build.gradle to reflect the Spec will be in README.adoc Add renderOmniSpecification Gradle task --- .github/workflows/gradle.yml | 21 +++++++++++++++++++++ .gitignore | 4 ++++ build.gradle | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/gradle.yml create mode 100644 .gitignore create mode 100644 build.gradle diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..2c7feac --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,21 @@ +name: Documentation Build + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + name: Asciidoctor Gradle + steps: + - uses: actions/checkout@v1 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Gradle + run: gradle renderOmniSpecification --info --stacktrace + - name: Upload build directory as artifact + uses: actions/upload-artifact@master + with: + name: omni-spec-documentation-archive + path: build/doc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..752f8de --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.gradle/ +build/ +.idea/ + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..2b97698 --- /dev/null +++ b/build.gradle @@ -0,0 +1,32 @@ +buildscript { + repositories { + jcenter() + } +} + +plugins { + id 'org.asciidoctor.jvm.convert' version '2.3.0' + id 'org.asciidoctor.jvm.pdf' version '2.3.0' +} + +repositories { + jcenter() +} + +asciidoctor { + sourceDir file("$projectDir") + sources { + include 'README.adoc' + } + outputDir file('build/doc') +} + +asciidoctorPdf { + sourceDir file("$projectDir") + sources { + include 'README.adoc' + } + outputDir file('build/doc') +} + +task renderOmniSpecification(dependsOn: [asciidoctor, asciidoctorPdf])