Check Markdown links #938
This file contains hidden or 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: | |
| 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-22.04 | |
| if: github.event.pull_request.labels[0].name != 'no release notes' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| 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 - ./\nignorePatterns:\n - pattern: '^https://www.gnu.org/licenses.*$'\n" > .linkspector.yml ; fi | |
| # Run the check. | |
| linkspector check |