Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/broken-link-report.md
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.
39 changes: 39 additions & 0 deletions .github/workflows/daily-link-checker.yaml
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
13 changes: 13 additions & 0 deletions .github/workflows/markdown.links.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"replacementPatterns": [
{
"pattern": "^/",
"replacement": "https://keptn-experimental-docs-site.netlify.app/"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we doing this ^ @iamrajiv ?

Choose a reason for hiding this comment

The 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"
}
]
}