mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-08 12:16:12 -05:00
Add check articles script to Github Actions
This commit is contained in:
18
scripts/check-articles.ts
Normal file
18
scripts/check-articles.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// validates all articles files in the project are following the correct .md + grey matter format
|
||||
|
||||
import { mostRecentArticles } from "~/features/articles/core/list.server";
|
||||
import { logger } from "~/utils/logger";
|
||||
|
||||
async function main() {
|
||||
await mostRecentArticles(1000);
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => {
|
||||
logger.info("Articles are valid.");
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.error("Error validating articles:", error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user