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

Use [linkspector](https://github.com/UmbrellaDocs/linkspector) to check links #148

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
14 changes: 14 additions & 0 deletions .github/config/.linkspector.yml
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/'
53 changes: 35 additions & 18 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# GitHub Workflows Release Notes

## 0.0.3-dev - 2024-12-16
## 0.0.3-dev - 2024-12-18

### Features

- Use [linkspector](https://github.com/UmbrellaDocs/linkspector) to check links
(PR #148 by @chicco785)
- docker workflow: add javascript mode for cache (PR #146 by @chicco785)
- Add workflow to create a new release (PR #145 by @chicco785)
- golang workflow: include `.sql` and `.docker/*.yml` files in golang changes
Expand Down
Loading