diff --git a/.github/actions/validate/action.yml b/.github/actions/validate/action.yml index 8eef321e..3ee5c35b 100644 --- a/.github/actions/validate/action.yml +++ b/.github/actions/validate/action.yml @@ -25,6 +25,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 + npm i -D yaml@2.6.0 @jcahills/antora-link-checker@1.0.1 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 diff --git a/lib/load-check-links-playbook.js b/lib/load-check-links-playbook.js index 86fb1938..eaa38b72 100644 --- a/lib/load-check-links-playbook.js +++ b/lib/load-check-links-playbook.js @@ -20,6 +20,7 @@ const localAntoraPlaybook = YAML.parse(localAntoraPlaybookContent); const globalAntoraPlaybookContent = fs.readFileSync('./hazelcast-docs/antora-playbook.yml', 'utf8'); const globalAntoraPlaybook = YAML.parse(globalAntoraPlaybookContent); let globalSources = globalAntoraPlaybook.content.sources; + // 3. Modify global content.sources // - add hazelcast-docs GitHub URL const hazelcastDocsSource = globalSources.find(source => source.url === '.'); @@ -39,7 +40,7 @@ globalSources.unshift({ start_path: 'docs', }); -// - remove current target branch from the global content list +// - remove current target branch from the global content list by adding the branch name with the "!" prefix const currentRepoSource = globalSources.find(source => source.url.endsWith(currentRepoName)); currentRepoSource.branches.push(`!${baseBranchName}`);