Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/awesome-seo / .github/workflows/links-scheduled-issue.yml |
| Date | Not specified in source |
| Repository | Janady13/awesome-seo |
| Revision | fc91f8980826547bb461b49f8a2f6efca33d7e6d |
| Branch | main |
| Path or archive member | .github/workflows/links-scheduled-issue.yml |
| Original SHA-256 | 5eff519b9a3d755131c471ff02daf262e713927cbe8197971837d4927707315d |
| Git blob SHA | e17291604a946375a5151cbdac21f5f07e1d2eef |
| Reading-copy SHA-256 | 5eff519b9a3d755131c471ff02daf262e713927cbe8197971837d4927707315d |
Recovered source transcript
Download complete source text ↓68 lines · 1.9 KB
name: Links (Scheduled → Issue)
on:
workflow_dispatch:
schedule:
- cron: "0 11 * * 1" # Mondays 11:00 UTC
permissions:
contents: read
issues: write
jobs:
lychee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run lychee and write report
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: >
--config lychee.toml
--verbose
--no-progress
--output lychee-report.md
--format markdown
**/*.md
continue-on-error: true
- name: Create or update issue if broken links found
if: steps.lychee.outcome == 'failure'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const title = 'Broken links detected';
const reportPath = 'lychee-report.md';
const report = fs.existsSync(reportPath) ? fs.readFileSync(reportPath, 'utf8') : '(No report file found)';
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
per_page: 100
});
const existing = issues.find(i => i.title === title);
const body = `This is an automated report from a scheduled link check.\n\n${report}`;
if (existing) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: existing.number,
body
});
} else {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body
});
}