diff --git a/.github/actions/validate/action.yml b/.github/actions/validate/action.yml index fbd25c3e..885a5674 100644 --- a/.github/actions/validate/action.yml +++ b/.github/actions/validate/action.yml @@ -16,6 +16,7 @@ runs: sparse-checkout: | antora-playbook.yml lib/load-check-links-playbook.js + lib/antora-link-checker-extension.js sparse-checkout-cone-mode: false path: hazelcast-docs ref: main @@ -25,6 +26,6 @@ runs: run: | cp "./hazelcast-docs/lib/load-check-links-playbook.js" "./load-check-links-playbook.js" npm i - npm i -D yaml@2.6.0 @jcahills/antora-link-checker@1.0.1 matcher@3.0.0 + npm i -D yaml@2.6.0 matcher@3.0.0 node load-check-links-playbook.js $GITHUB_REPOSITORY $GITHUB_BASE_REF - ./node_modules/.bin/antora --fetch --to-dir test --log-level=error --log-failure-level=error --extension=@jcahills/antora-link-checker check-links-playbook.yml + ./node_modules/.bin/antora --fetch --to-dir test --log-level=error --log-failure-level=error --extension=hazelcast-docs/lib/antora-link-checker-extension.js check-links-playbook.yml diff --git a/lib/antora-link-checker-extension.js b/lib/antora-link-checker-extension.js new file mode 100644 index 00000000..185f6433 --- /dev/null +++ b/lib/antora-link-checker-extension.js @@ -0,0 +1,5 @@ +module.exports.register = (context) => { + context.on('documentsConverted', () => { + context.stop() + }) +} diff --git a/package.json b/package.json index 7331ebf3..ae4891f2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "antora --to-dir docs --fetch antora-playbook.yml && cp _redirects docs", "build-local": "antora --to-dir docs --fetch antora-playbook-local.yml", - "check-links-local": "antora --fetch --to-dir test --log-level=error --log-failure-level=error --extension=@jcahills/antora-link-checker antora-playbook-local.yml", + "check-links-local": "antora --fetch --to-dir test --log-level=error --log-failure-level=error --extension=./lib/antora-link-checker-extension.js antora-playbook-local.yml", "generate-pdfs-platform-5-5": "antora assembler-playbook-platform-5-5.yml", "generate-pdfs-platform-5-4": "antora assembler-playbook-platform-5-4.yml", "generate-pdfs-platform-5-3": "antora assembler-playbook-platform-5-3.yml", @@ -26,7 +26,6 @@ "devDependencies": { "@antora/cli": "^3.1.1", "@antora/site-generator": "^3.1.1", - "@jcahills/antora-link-checker": "^1.0.1", "@djencks/antora-aggregate-collector": "^0.1.0-beta.1", "asciidoctor-kroki": "^0.15.0", "ngrok": "^4.2.2",