Skip to content

Update markdown-link-check.yml #1

Update markdown-link-check.yml

Update markdown-link-check.yml #1

#
# This source file is part of the Stanford Biodesign Digital Health Group open-source organization
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
name: Check Links
on:
workflow_call:
jobs:
markdown_link_check:
name: Check Links
runs-on: ubuntu-latest
steps:
- 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: |

Check failure on line 25 in .github/workflows/markdown-link-check.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/markdown-link-check.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
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: \"\"" >> $CONFIG_FILE
echo " - pattern: \"#gh-light-mode-only\"" >> $CONFIG_FILE
echo " replacement: \"\"" >> $CONFIG_FILE
else
echo "Configuration file exists. Skipping creation."
fi
- name: Linkspector
uses: umbrelladocs/action-linkspector@v1
with:
filter_mode: nofilter