Skip to content

testing workflow for syncing readme and index #1

testing workflow for syncing readme and index

testing workflow for syncing readme and index #1

name: Sync README to index.md
on:
push:
branches: [main]
paths:
- 'README.md'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# persist-credentials: true is default and lets us push later
- name: Copy README → index.md
run: |
cp README.md index.md
- name: Commit & push if changed
id: sync
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add index.md
if git diff-index --quiet HEAD; then
echo "No changes in index.md; skipping commit."
else
git commit -m "chore: auto-sync index.md from README.md"
git push
fi