mirror of
https://github.com/m3y54m/Embedded-Engineering-Roadmap.git
synced 2026-10-10 00:08:23 +03:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Link check
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * 1"
|
|
pull_request:
|
|
paths:
|
|
- "**/*.md"
|
|
- ".github/lychee.toml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lychee:
|
|
name: Check links
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Check links
|
|
id: lychee
|
|
uses: lycheeverse/lychee-action@v2
|
|
with:
|
|
args: --config .github/lychee.toml --no-progress "**/*.md"
|
|
output: lychee/out.md
|
|
# Pull requests report broken links without blocking; scheduled runs fail and open an issue.
|
|
fail: ${{ github.event_name != 'pull_request' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Report broken links
|
|
if: always() && github.event_name != 'pull_request' && steps.lychee.outputs.exit_code != 0
|
|
uses: peter-evans/create-issue-from-file@v6
|
|
with:
|
|
title: Link check report
|
|
content-filepath: lychee/out.md
|
|
labels: broken-links
|