diff --git a/.github/workflows/pr-link-validation.yml b/.github/workflows/pr-link-validation.yml new file mode 100644 index 000000000..719bcdfb7 --- /dev/null +++ b/.github/workflows/pr-link-validation.yml @@ -0,0 +1,30 @@ +name: "Docs: Antora Link Validation" + +on: + pull_request: + branches: + - main + - staging + paths: + - '**/*.adoc' + - 'ss-local-playbook.yml' + - 'Makefile' + +jobs: + validate-internal-links: + name: Run Antora Build & Link Check + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' # Matches standard modern Antora environments + + - name: Install Dependencies + run: make environment + + - name: Verify Documentation Links + run: make pr-link-check \ No newline at end of file diff --git a/Makefile b/Makefile index 6920b6de5..f46eeadcd 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,12 @@ .PHONY: all test +.PHONY: pr-link-check +pr-link-check: + mkdir -p tmp + npx antora --version + npx antora --log-failure-level=warn --stacktrace --log-format=pretty --log-level=info \ + ss-local-playbook.yml + .PHONY: local local: mkdir -p tmp diff --git a/docs/latest/modules/en/pages/test.adoc b/docs/latest/modules/en/pages/test.adoc new file mode 100644 index 000000000..48161f49f --- /dev/null +++ b/docs/latest/modules/en/pages/test.adoc @@ -0,0 +1,3 @@ +xref:installing-suse-obs.adoc[this works] + +xref:installing-suse-obss.adoc[broken link] \ No newline at end of file