-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add broken link checker #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| name: Broken link report | ||
| about: Automated issue template for reporting link checker fails | ||
| title: Failing link check ({{ date | date('dddd, MMMM Do') }}) | ||
| labels: automated issue, bug, documentation, broken links | ||
| --- | ||
|
|
||
| The broken link check failed. Check [the workflow logs](https://https://github.com/keptn-sandbox/new-keptn-docs-engine/actions/workflows/daily-link-checker.yaml) to identify the failing links. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Check all markdown links daily | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 23 * * *' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| markdown-link-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
| # checks all markdown files from /docs including all subfolders | ||
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'yes' | ||
| config-file: '.github/workflows/markdown.links.config.json' | ||
| folder-path: 'docs/' | ||
| - uses: actions/checkout@master | ||
| - uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
| # checks all markdown files from the root but ignores subfolders | ||
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'yes' | ||
| config-file: '.github/workflows/markdown.links.config.json' | ||
| max-depth: 0 | ||
|
|
||
| # Automatically create an issue if there are broken links | ||
| - name: Create issue | ||
| if: ${{ failure() }} | ||
| uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| filename: .github/ISSUE_TEMPLATE/broken-link-report.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "replacementPatterns": [ | ||
| { | ||
| "pattern": "^/", | ||
| "replacement": "https://keptn-experimental-docs-site.netlify.app/" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we doing this? 📝 https://github.com/tcort/markdown-link-check#config-file-format There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we doing this ^ @iamrajiv ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After discussion with @iamrajiv , he's going to try this out ^ and show us the results here with a before and after (replacement) in the docs. |
||
| } | ||
| ], | ||
| "ignorePatterns": [ | ||
| { | ||
| "pattern": "^https?://localhost" | ||
iamrajiv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| ] | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.