Skip to content

Commit b91e2a9

Browse files
sync readme to index workflow
1 parent 538d4ef commit b91e2a9

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Sync README to index.md
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'README.md'
8+
9+
jobs:
10+
sync:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
# persist-credentials: true is default and lets us push later
17+
18+
- name: Copy README → index.md
19+
run: |
20+
cp README.md index.md
21+
22+
- name: Commit & push if changed
23+
id: sync
24+
run: |
25+
git config user.name "github-actions[bot]"
26+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
27+
git add index.md
28+
if git diff-index --quiet HEAD; then
29+
echo "No changes in index.md; skipping commit."
30+
else
31+
git commit -m "chore: auto-sync index.md from README.md"
32+
git push
33+
fi

0 commit comments

Comments
 (0)