Check the docs for broken links #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check the docs for broken links | |
on: | |
workflow_run: | |
workflows: ["pages-build-deployment"] | |
types: [completed] | |
jobs: | |
on-success: | |
name: Check the docs for broken links | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Get GH Pages URL | |
id: gh_pages_url | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
let result = await github.request('GET /repos/:owner/:repo/pages', { | |
owner: context.repo.owner, | |
repo: context.repo.repo | |
}); | |
console.log(result.data.html_url); | |
return result.data.html_url | |
result-encoding: string | |
- name: Check the docs for broken links | |
uses: ruzickap/action-my-broken-link-checker@v2 # nosemgrep: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha | |
with: | |
url: ${{ steps.gh_pages_url.outputs.result }} | |
cmd_params: '--exclude="(https://fastkafka.airt.ai/docs/next/api/fastkafka/#fastkafka.FastKafka|https://fastkafka.airt.ai/docs/next/api/fastkafka/testing/Tester/#fastkafka.testing.Tester|https://fonts.gstatic.com|https://www.linkedin.com/company/airt-ai|https://EHYNSIUGMY-dsn.algolia.net|https://www.googletagmanager.com|https://github.com/airtai/fastkafka/blob)" --buffer-size=8192 --max-connections=10 --color=always --header="User-Agent:curl/7.54.0" --timeout=20 --skip-tls-verification --verbose' | |