Skip to content

Sync profile README

Sync profile README #8

name: Sync profile README
on:
push:
paths:
- 'README.md'
workflow_dispatch: {}
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Ensure folder exists
run: mkdir -p profile
- name: Commit changes if source differs from destination or missing
run: |
if [ ! -f profile/README.md ] || ! cmp -s README.md profile/README.md; then
cp README.md profile/README.md
git add profile/README.md
git -c user.name="${{ github.actor }}" \
-c user.email="${{ github.actor }}@users.noreply.github.com" \
commit -m "chore: sync profile/README.md from root README.md"
git push
else
echo "No changes to commit"
fi