Check Markdown links #326
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
name: Check Markdown links | |
# See https://github.com/UmbrellaDocs/linkspector | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab. | |
workflow_dispatch: | |
schedule: | |
- # Run every day at 5:00 UTC | |
- cron: "0 5 * * *" | |
# Allow this workflow to be called from other repositories. | |
workflow_call: | |
jobs: | |
markdown-link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm install -g @umbrelladocs/linkspector | |
- name: Check links | |
run: | | |
# Generate default configuration file if it doesn't exist. | |
if [ ! -f .linkspector.yml ] ; then printf "dirs:\n - ./\n" > .linkspector.yml ; fi | |
# Run the check. | |
linkspector check |