diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6a8c883 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,62 @@ +# A GitHub Actions workflow for the AsciiDocDITA[1] vale style. +# +# This workflow runs on a specific branch, validates all relevant AsciiDoc +# files, and reports markup that is problematic for the conversion to DITA. +# +# [1] https://github.com/jhradilek/asciidoctor-dita-vale + +name: DITA compatibility + +on: + push: + # Customize the list of branches to run this workflow on: + branches: + - master + +jobs: + content-readiness: + name: Relevant files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Vale + run: sudo snap install vale + + - name: Configure Vale + run: | + cat <<-'EOF' > dita.ini + StylesPath = .vale/styles + MinAlertLevel = warning + Packages = https://github.com/jhradilek/asciidoctor-dita-vale/releases/latest/download/AsciiDocDITA.zip + + [*.adoc] + BasedOnStyles = AsciiDocDITA + EOF + + cat <<-'EOF' > dita.tmpl + {{range .Files}} + {{- $path := .Path -}} + {{- range .Alerts -}} + {{.Severity | upper}}: {{$path}}: line {{.Line}}: {{.Message}} ({{.Check}}) + {{end -}} + {{end -}} + EOF + + - name: Install AsciiDocDITA + run: vale --config dita.ini sync + + # Customize the discovery of relevant files: + - name: Discover files + run: find . -type f -name '*.adoc' > RELEVANT_FILES + + - name: Verify file naming conventions + run: | + ! cat RELEVANT_FILES | grep -e '[^0-9a-zA-Z/._-]' + + - name: Analyze files + run: cat RELEVANT_FILES | xargs -n 4 vale --config dita.ini --output dita.tmpl > VALE_RESULTS || true + + - name: Verify DITA compatibility + run: | + ! grep -he '^\(error\|warning\):' VALE_RESULTS diff --git a/README.md b/README.md index c9970ab..ede0f09 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -To Deploy the latest minor version of AMQ follow [Deploying AMQ Broker on OpenShift](https://access.redhat.com/documentation/en-us/red_hat_amq/2021.q3/html/deploying_amq_broker_on_openshift/index). +To deploy the latest minor release of AMQ Broker, see [Deploying AMQ Broker on OpenShift](https://access.redhat.com/documentation/en-us/red_hat_amq/2021.q3/html/deploying_amq_broker_on_openshift/index). -Alternatively if you want to deploy the Long Term Supported (LTS) release follow [Deploying AMQ Broker on OpenShift](https://access.redhat.com/documentation/en-us/red_hat_amq/2020.q4/html/deploying_amq_broker_on_openshift/index). +Alternatively, if you want to deploy the Long Term Supported (LTS) release of AMQ Broker, see [Deploying AMQ Broker on OpenShift](https://access.redhat.com/documentation/en-us/red_hat_amq/2020.q4/html/deploying_amq_broker_on_openshift/index). -For more information on what an LTS release is refer to the [Release Notes](https://access.redhat.com/documentation/en-us/red_hat_amq/2020.q4/html/release_notes_for_red_hat_amq_broker_7.8/lts_releases). \ No newline at end of file +For more information about what an LTS release is, see the [Release Notes](https://access.redhat.com/documentation/en-us/red_hat_amq/2020.q4/html/release_notes_for_red_hat_amq_broker_7.8/lts_releases). \ No newline at end of file