Skip to content

Commit

Permalink
use local links-checker-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
fantkolja committed Nov 27, 2024
1 parent 2debd65 commit 9f8719e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/actions/validate/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 [email protected] @jcahills/[email protected] [email protected]
npm i -D [email protected] [email protected]
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
5 changes: 5 additions & 0 deletions lib/antora-link-checker-extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports.register = (context) => {
context.on('documentsConverted', () => {
context.stop()
})
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 9f8719e

Please sign in to comment.