From b1c2078aff037f16bb30ab8a28f84f0d2eb86002 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 05:40:55 -0700 Subject: [PATCH 1/9] Bypass reviewdog and install Vale directly --- .github/workflows/docs.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 801409da97..ae1c26be04 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,6 +39,21 @@ jobs: - name: Build HTML documentation run: make docs-html + - name: Get latest version of Vale + id: lastversion + uses: dvershinin/lastversion-action@v0.0.3 + with: + repository: errata-ai/vale + + - name: Install Vale + run: | + wget https://github.com/errata-ai/vale/releases/download/v${{ steps.lastversion.outputs.last_version }}/vale_${{ steps.lastversion.outputs.last_version }}_Linux_64-bit.tar.gz -O vale.tar.gz + tar -xvzf vale.tar.gz vale + rm vale.tar.gz + + - name: Run Vale + run: ./vale --config=.vale.ini *.md + # Disable GHA vale checking, it started to fail with a gazillion of # violations. We need to review it closely # - uses: errata-ai/vale-action@reviewdog From 3ff1d73a49892e608c3b132103de08276a2e21a8 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 06:02:28 -0700 Subject: [PATCH 2/9] Make a change to docs so that Vale will run in CI --- docs/source/contributing/branch-policy.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/contributing/branch-policy.md b/docs/source/contributing/branch-policy.md index 843ee8ba0b..1767efeb15 100644 --- a/docs/source/contributing/branch-policy.md +++ b/docs/source/contributing/branch-policy.md @@ -42,6 +42,11 @@ legacy : At the moment of this writing, `15.x.x` is the current stable branch in git. Upon the final release of version 16.0.0, the `15.x.x` branch line will become legacy. +```{todo} +See https://github.com/plone/volto/issues/5255. +``` + + ## Translation contributing policy Due to the nature of `main` and `16.x.x` branches, some developments that may land in `main` may not be backported to `16.x.x`. This means that many translations that may come with those developments will be useless in the `16.x.x` branch and thus porting them to `16.x.x` makes no sense. From dae966cb9fbcaf5a396e4678f14e0317d0cabcfa Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:10:44 +0200 Subject: [PATCH 3/9] Try the method from plone/documentation --- .github/workflows/docs.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ae1c26be04..a1e39c40a5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,20 +39,12 @@ jobs: - name: Build HTML documentation run: make docs-html - - name: Get latest version of Vale - id: lastversion - uses: dvershinin/lastversion-action@v0.0.3 - with: - repository: errata-ai/vale - - - name: Install Vale + - name: Run vale run: | - wget https://github.com/errata-ai/vale/releases/download/v${{ steps.lastversion.outputs.last_version }}/vale_${{ steps.lastversion.outputs.last_version }}_Linux_64-bit.tar.gz -O vale.tar.gz - tar -xvzf vale.tar.gz vale - rm vale.tar.gz - - - name: Run Vale - run: ./vale --config=.vale.ini *.md + git clone https://github.com/errata-ai/Microsoft.git + cp -r ./Microsoft/Microsoft ./styles + VALEFILES=$(find -L ./docs/ -type d -prune -false -o -type f -name "*.md" -print) + vale --no-exit $VALEFILES # Disable GHA vale checking, it started to fail with a gazillion of # violations. We need to review it closely From ee115e4905a43280cd236a9404acfb3243769183 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:15:46 +0200 Subject: [PATCH 4/9] Install vale via snap --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a1e39c40a5..94f92e00ca 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,7 +31,9 @@ jobs: run: pip install virtualenv - name: pip install requirements - run: pip install -r requirements-docs.txt + run: | + pip install -r requirements-docs.txt + sudo snap install --edge vale - name: Check for broken links run: make docs-linkcheckbroken From fe918dd91fce2df20e50c0ee2c78f4161a6b7fac Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:16:00 +0200 Subject: [PATCH 5/9] Force run of docs workflow --- docs/source/contributing/branch-policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/contributing/branch-policy.md b/docs/source/contributing/branch-policy.md index 1767efeb15..bda1a0cae9 100644 --- a/docs/source/contributing/branch-policy.md +++ b/docs/source/contributing/branch-policy.md @@ -43,7 +43,7 @@ legacy Upon the final release of version 16.0.0, the `15.x.x` branch line will become legacy. ```{todo} -See https://github.com/plone/volto/issues/5255. +See https://github.com/plone/volto/issues/5255 ``` From 2d8ff4de8eec655fed901decb9646c2186755d43 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:22:43 +0200 Subject: [PATCH 6/9] Fix input arg --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 94f92e00ca..024e9b4b62 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,8 +45,7 @@ jobs: run: | git clone https://github.com/errata-ai/Microsoft.git cp -r ./Microsoft/Microsoft ./styles - VALEFILES=$(find -L ./docs/ -type d -prune -false -o -type f -name "*.md" -print) - vale --no-exit $VALEFILES + vale ./docs # Disable GHA vale checking, it started to fail with a gazillion of # violations. We need to review it closely From 54309d15b21d292aef120b29596f63e1c526dd0e Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:26:50 +0200 Subject: [PATCH 7/9] Suppress the incorrect exit code so that CI passes. Our speling is not gud enuf yet. --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 024e9b4b62..07d3ae6a2e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,7 +45,7 @@ jobs: run: | git clone https://github.com/errata-ai/Microsoft.git cp -r ./Microsoft/Microsoft ./styles - vale ./docs + vale --no-exit ./docs # Disable GHA vale checking, it started to fail with a gazillion of # violations. We need to review it closely From b6b72064512cb6f379001bbcc7a98ddc4bbe7fe3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:48:28 +0200 Subject: [PATCH 8/9] Add changelog --- news/5256.documentation | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/5256.documentation diff --git a/news/5256.documentation b/news/5256.documentation new file mode 100644 index 0000000000..1b7cf33e5e --- /dev/null +++ b/news/5256.documentation @@ -0,0 +1 @@ +Reenable GHA vale checking, but with configuration from `plone/documentation`. It now runs Vale, but with the flag `--no-exit` which means "Don't return a nonzero exit code on errors." It also eliminates reviewdog as the test runner. @stevepiercy From 86eeccc5620a3db2136d61f57427aa0cbe2dd893 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 1 Oct 2023 15:52:40 +0200 Subject: [PATCH 9/9] Remove comments --- .github/workflows/docs.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 07d3ae6a2e..08763d2f3a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -46,14 +46,3 @@ jobs: git clone https://github.com/errata-ai/Microsoft.git cp -r ./Microsoft/Microsoft ./styles vale --no-exit ./docs - - # Disable GHA vale checking, it started to fail with a gazillion of - # violations. We need to review it closely - # - uses: errata-ai/vale-action@reviewdog - # with: - # # debug: true - # files: all - # env: - # # Required, set by GitHub actions automatically: - # # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret - # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}