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

feat(other): add documentation check to CI #6824

Merged
Merged
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
3 changes: 3 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ webapp: &webapp
- '.github/workflows/test-webapp.yml'
- 'webapp/**/*'
- 'package.json'

markdown-files: &markdown-files
- '**/*.md'
40 changes: 40 additions & 0 deletions .github/workflows/check-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ocelot.social check documentation

on: push

jobs:
files-changed:
name: Detect File Changes - Markdown files
runs-on: ubuntu-latest
outputs:
markdown-files: ${{ steps.changes.outputs.markdown-files }}
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Check for markdown file changes
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

check-markdown-links:
name: Check Markdown links
if: needs.files-changed.outputs.markdown-files == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Check Markdown Links
uses: gaurav-nelson/github-action-markdown-link-check@master
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
# at any .md file change take the chance to check the links in all .md files
check-modified-files-only: 'no'
config-file: '.github/workflows/mlc_config.json'
base-branch: 'master'
folder-path: '.'
12 changes: 12 additions & 0 deletions .github/workflows/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"timeout": "20s",
"retryOn429": true,
"retryCount": 2,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206],
"ignorePatterns": [
{
"pattern": "^(https:\/\/github.com\/Ocelot-Social-Community\/Ocelot-Social\/pull\/|http:\/\/localhost)"
}
]
}
ulfgebhardt marked this conversation as resolved.
Show resolved Hide resolved