From b5c5ececcb23a356a82473c7bacc9c42d725127c Mon Sep 17 00:00:00 2001 From: Geoffrey Cline Date: Wed, 23 Oct 2024 22:30:15 -0500 Subject: [PATCH] add vale style check --- .github/workflows/vale.yml | 28 ++++++++++++++++++++++++++++ bpg-docs.code-workspace | 2 +- vale/styles/BpgDocs/AwsBrand.yml | 5 +++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/vale.yml create mode 100644 vale/styles/BpgDocs/AwsBrand.yml diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml new file mode 100644 index 000000000..9ab46baa1 --- /dev/null +++ b/.github/workflows/vale.yml @@ -0,0 +1,28 @@ +name: Style check + +on: + pull_request: + workflow_dispatch: + +jobs: + style-job: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v3 + + # For AsciiDoc users: + - name: Install Asciidoctor + run: sudo apt-get install -y asciidoctor + + - name: Run Vale + uses: errata-ai/vale-action@reviewdog + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + fail_on_error: true + reporter: github-pr-check + filter_mode: added + files: latest/bpg + continue-on-error: false + diff --git a/bpg-docs.code-workspace b/bpg-docs.code-workspace index c30092694..c6f4c5bea 100644 --- a/bpg-docs.code-workspace +++ b/bpg-docs.code-workspace @@ -1,7 +1,7 @@ { "folders": [ { - "name": "📦 AmazonEKSDocsTachyonPreview", + "name": "📦 AmazonEKSBestPracticesDocs", "path": "." } ], diff --git a/vale/styles/BpgDocs/AwsBrand.yml b/vale/styles/BpgDocs/AwsBrand.yml new file mode 100644 index 000000000..b8d997fff --- /dev/null +++ b/vale/styles/BpgDocs/AwsBrand.yml @@ -0,0 +1,5 @@ +extends: existence +message: "Don't write out 'AWS' literally. Use the variable '{aws}' instead." +level: error +raw: + - \bAWS\p{Z}+[\p{L}\p{N}]+\b