Skip to content

Commit

Permalink
Move to Linkspector (#96)
Browse files Browse the repository at this point in the history
# Move to Linkspector

## ⚙️ Release Notes 
- Replace Markdown Link check with Linkspector

### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).

---------

Signed-off-by: Paul Schmiedmayer <PSchmiedmayer@users.noreply.github.com>
  • Loading branch information
PSchmiedmayer authored Jan 20, 2025
1 parent 84f0ea8 commit f1a46e8
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,42 @@
# SPDX-License-Identifier: MIT
#

name: Check README Links
name: Check Links

on:
workflow_call:

jobs:
markdown_link_check:
name: Check Links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Markdown Link Check
uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: actions/checkout@v4
- name: Linkspector Ubuntu Workaround
run: |
echo "Linkspector Ubuntu Workaround for: https://github.com/UmbrellaDocs/action-linkspector/issues/32"
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Check and Create Linkspector Configuration
run: |
CONFIG_FILE=".linkspector.yml"
if [ ! -f "$CONFIG_FILE" ]; then
echo "Configuration file not found. Creating a new one."
echo "dirs:" >> $CONFIG_FILE
echo " - ." >> $CONFIG_FILE
echo "useGitIgnore: true" >> $CONFIG_FILE
echo "ignorePatterns:" >> $CONFIG_FILE
echo " - pattern: '^doc:.*$'" >> $CONFIG_FILE
echo "replacementPatterns:" >> $CONFIG_FILE
echo " - pattern: '(.*)#gh-dark-mode-only'" >> $CONFIG_FILE
echo " replacement: '\$1'" >> $CONFIG_FILE
echo " - pattern: '(.*)#gh-light-mode-only'" >> $CONFIG_FILE
echo " replacement: '\$1'" >> $CONFIG_FILE
else
echo "Configuration file exists. Skipping creation."
fi
echo "Contents of $CONFIG_FILE:"
cat $CONFIG_FILE
- name: Linkspector
uses: umbrelladocs/action-linkspector@v1
with:
filter_mode: nofilter

0 comments on commit f1a46e8

Please sign in to comment.