Skip to content
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

fix(docs): Added a GitHub action for markdown link check. #5997

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
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') }})
Copy link
Member

Choose a reason for hiding this comment

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

this should follow v2 title template: fix(docs): ...

labels: bug, automated issue, link check
Copy link
Member

Choose a reason for hiding this comment

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

add v2

---

The broken link check failed. Check [the workflow logs](https://github.com/SeldonIO/testing-gitbook/actions/workflows/daily-link-checker.yml) to identify the failing links.
31 changes: 31 additions & 0 deletions .github/workflows/daily-link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check all Markdown links daily
Copy link
Member

Choose a reason for hiding this comment

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

As the main branch is not v2 in the github repo, this will also require a "dummy" workflow checked in in the main master branch in a follow up PR. check here for an example: https://github.com/SeldonIO/seldon-core/blob/master/.github/workflows/license.yml


on:
Copy link
Member

Choose a reason for hiding this comment

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

should we also add manual trigger option and push on v2?

schedule:
- cron: "0 23 * * *"

permissions:
contents: read
issues: write

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Check links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/workflows/markdown.links.config.json'
folder-path: 'docs-gb'

- name: Create issue
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE/broken_link_report.md
87 changes: 87 additions & 0 deletions .github/workflows/markdown.links.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

could you explain the logic behind this file for review?

"replacementPatterns": [
{
"pattern": ":currentVersion:",
"replacement": "latest"
},
{
"pattern": "^/",
"replacement": "https://docs.seldon.ai/seldon-core-2/"
}
],
"ignorePatterns": [
{
"pattern": "^getting-started/"
},
{
"pattern": "^production-environment/"
},
{
"pattern": "^product-tour/"
},
{
"pattern": "^demos/"
},
{
"pattern": "^architecture/"
},
{
"pattern": "^operations/"
},
{
"pattern": "^upgrading/"
},
{
"pattern": "^README.md"
},
{
"pattern": "^multi-tentant-environment.md"
},
{
"pattern": "^openshift-environment.md"
},
{
"pattern": "^help-and-support/"
},
{
"pattern": "^https?://localhost"
},
{
"pattern": "^https://mvnrepository.com"
},
{
"pattern": "^https://platform.openai.com/docs"
},
{
"pattern": "^http://default-broker.seldon-logs"
},
{
"pattern": "^https://www.tensorflow.org/tfx/serving/api_rest#request_format_2"
},
{
"pattern": "^https://otexts.org/fpp2/holt-winters.html"
},
{
"pattern": "^https://www.pcmag.com/encyclopedia"
},
{
"pattern": "^https://www.microsoft.com/en-us/download/details.aspx?"
},
{
"pattern": "^https://opensea.io/"
},
{
"pattern": "^https://www.techopedia.com/definition/31996/hash-partitioning"
},
{
"pattern": "^https://docs.github.com/"
},
{
"pattern": "_template"
},
{
"pattern": "^[#._]"
},
]
}

Loading