mirror of
https://github.com/nicholaswilde/recipes.git
synced 2025-10-29 11:44:47 +00:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
---
|
|
name: link-check
|
|
on: # yamllint disable-line rule:truthy
|
|
# Schedule check each day at 8 UTC
|
|
schedule: [{cron: "0 8 * * *"}]
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/**/*.md'
|
|
- 'cook/**/*.cook'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
markdown-link-check:
|
|
name: Markdown link check
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Get event type
|
|
id: get-type
|
|
run: |
|
|
if [ "${{ github.event_name }}" == "schedule" ]; then
|
|
echo "MOD_ONLY=no" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "MOD_ONLY=yes" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
- name: Check markdown links
|
|
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
with:
|
|
folder-path: './docs'
|
|
config-file: './mlc_config.json'
|
|
use-quiet-mode: 'yes'
|
|
check-modified-files-only: ${{ steps.get-type.outputs.MOD_ONLY }}
|
|
base-branch: 'main'
|