Skip to content

Commit 14bdd8e

Browse files
fix(docs): update lychee
1 parent 561b492 commit 14bdd8e

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

β€Ž.github/workflows/lychee.ymlβ€Ž

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,10 @@ jobs:
159159
echo "</details>" >> lychee/formatted.md
160160
161161
# Hard truncate as a final guardrail for sticky PR comments
162-
python - <<'PY'
163-
from pathlib import Path
164-
p = Path("lychee/formatted.md")
165-
if p.exists():
166-
max_chars = 60000
167-
text = p.read_text(encoding="utf-8")
168-
if len(text) > max_chars:
169-
note = "\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n"
170-
p.write_text(text[: max_chars - len(note)] + note, encoding="utf-8")
171-
PY
162+
python3 -c "from pathlib import Path; p = Path('lychee/formatted.md'); max_chars = 60000; note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'; text = p.read_text(encoding='utf-8') if p.exists() else ''; p.write_text(text[: max_chars - len(note)] + note, encoding='utf-8') if p.exists() and len(text) > max_chars else None"
172163
else
173164
# Ensure sticky PR comment always has content even if Lychee output is missing
174-
cat > lychee/formatted.md <<'EOF'
175-
## 🍈 Lychee Link Check Report
176-
177-
Lychee did not produce a markdown report file for this run.
178-
Check the workflow logs and uploaded artifact for details.
179-
EOF
165+
printf '%s\n' '## 🍈 Lychee Link Check Report' '' 'Lychee did not produce a markdown report file for this run.' 'Check the workflow logs and uploaded artifact for details.' > lychee/formatted.md
180166
fi
181167
182168
- name: πŸ“¦ Upload Lychee reports

0 commit comments

Comments
Β (0)