Skip to content

Commit 7ce016a

Browse files
committed
Add data.json as source of truth with GitHub Action to generate README
1 parent 1857d8a commit 7ce016a

3 files changed

Lines changed: 1122 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Generate README
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ['data.json']
7+
8+
jobs:
9+
generate:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
- name: Generate README
19+
run: node scripts/generate-readme.js
20+
- name: Commit changes
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
git add README.md
25+
git diff --staged --quiet || git commit -m "docs: regenerate README from data.json"
26+
git push

0 commit comments

Comments
 (0)