fix: improve README generation workflow and script

- Update `generate-readme.yml` to trigger on `main` branch pushes.
- Change `generate-readme.js` exit code to 1 on errors for CI failure.
- Fix formatting in `template.js` for entry summary HTML.
This commit is contained in:
Lucas Shamanic 2026-01-13 16:34:34 +00:00
parent 6aa3eac821
commit 0771e63582
3 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@ name: Auto-Generate README
on:
push:
branches:
- shamanic/data-driven-automation
- main
paths:
- 'data/**'

View file

@ -6,7 +6,7 @@
* generates HTML, and writes the final README.md
*/
const fs = require('fs');
const path = require('path');
const { readYamlDir } = require('./utils/yaml');
const { validateEntry, formatValidationErrors } = require('./utils/validation');
@ -146,7 +146,7 @@ async function main() {
// Execute main function
main()
.then(({ totalEntries, categoryCount, errorCount }) => {
process.exit(errorCount > 0 ? 0 : 0);
process.exit(errorCount > 0 ? 1 : 0);
})
.catch(err => {
console.error('\n❌ Generation failed:', err.message);

View file

@ -56,7 +56,7 @@ function generateEntryHtml(entry) {
summaryContent += ` <img src="${starBadge}" height="14"/>`;
}
summaryContent += ` - <i>${entry.tagline}</i>`;
summaryContent += ` - <i>${entry.tagline}</i>`;
return `<details>
<summary>${summaryContent}</summary>