-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use [linkspector](https://github.com/UmbrellaDocs/linkspector) to che…
…ck links (#148) ## Description Use [linkspector](https://github.com/UmbrellaDocs/linkspector) to check links ## Changes Made * Use linkspector to check links * Update defaults ## Related Issues Fixes #131 ## Checklist - [x] I have used a PR title that is descriptive enough for a release note. - [x] I have tested these changes locally. - [x] I have added appropriate tests or updated existing tests. - [ ] I have tested these changes on a cluster [name of the cluster] / customer [name of the customer] - [ ] I have added appropriate documentation or updated existing documentation. --------- Co-authored-by: cosimomeli <[email protected]>
- Loading branch information
1 parent
0a92a13
commit f8850fa
Showing
3 changed files
with
52 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# https://github.com/UmbrellaDocs/linkspector?tab=readme-ov-file#configuration | ||
dirs: | ||
- . | ||
useGitIgnore: true | ||
aliveStatusCodes: | ||
- 200 | ||
- 201 | ||
- 204 | ||
- 206 | ||
- 429 | ||
ignorePatterns: | ||
- pattern: '^https://localhost' | ||
- pattern: '^https://github.com/orgs/zaphiro-technologies/' | ||
- pattern: '^https://github.com/zaphiro-technologies/' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ on: | |
type: boolean | ||
config-links-path: | ||
required: false | ||
default: '.github/config/md-link-config.json' | ||
default: '.github/config/.linkspector.yml' | ||
type: string | ||
config-lint-path: | ||
default: '.github/config/.markdownlint.json' | ||
|
@@ -72,7 +72,7 @@ jobs: | |
scripts: | ||
- '.github/config/.markdownlint.json' | ||
- '.github/config/.prettierignore' | ||
- '.github/config/md-link-config.json' | ||
- '.github/config/.linkspector.yml' | ||
- '.gramma.json' | ||
- '.grammarignore' | ||
- 'grammar-check.sh' | ||
|
@@ -108,23 +108,40 @@ jobs: | |
git config --global user.email '[email protected]' | ||
git commit -am "Automated markdown-lint fixes [dependabot skip]" || echo "No changes to commit" | ||
git push | ||
shopt -s globstar | ||
rm -fr vendor | ||
rm -fr */vendor | ||
# Checks the status of hyperlinks in .md and .MD files in verbose mode (the action is case sensitive and .{MD,md}) | ||
- name: Check links (.md) | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }} | ||
use-verbose-mode: 'yes' | ||
use-quiet-mode: 'yes' | ||
- name: Check links (.MD) | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
- name: Fix apparmor issue for puppeteer | ||
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | ||
- name: Default configuration for link checker | ||
run: | | ||
FILE=${{ inputs.config-link-path || '.github/config/.linkspector.yml' }} | ||
if [ -f $FILE ]; then | ||
echo "'$FILE' Exists" | ||
else | ||
# Write content to the file | ||
cat <<EOF > "$FILE" | ||
dirs: | ||
- . | ||
excludedDirs: | ||
- vendor | ||
useGitIgnore: true | ||
aliveStatusCodes: | ||
- 200 | ||
- 201 | ||
- 204 | ||
- 206 | ||
- 429 | ||
ignorePatterns: | ||
- pattern: '^http(s?)://localhost' | ||
- pattern: '^https://github.com/orgs/zaphiro-technologies/' | ||
- pattern: '^https://github.com/zaphiro-technologies/' | ||
EOF | ||
fi | ||
- name: Check links | ||
uses: umbrelladocs/action-linkspector@v1 | ||
with: | ||
config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }} | ||
use-verbose-mode: 'yes' | ||
use-quiet-mode: 'yes' | ||
file-extension: '.MD' | ||
filter_mode: nofilter | ||
reporter: github-pr-review | ||
config_file: ${{ inputs.config-link-path || '.github/config/.linkspector.yml' }} | ||
fail_on_error: true | ||
markdown-spellchecker: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
|
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