Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Update README

on:
pull_request:
types: [closed]
branches:
- main
paths:
Expand All @@ -16,6 +17,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -29,14 +33,16 @@ jobs:
- name: Update README
run: npm run update:readme

- name: Push changes
- name: Push changes (if any)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain README.md)" ]; then
git add README.md
git commit -m "chore: update README"
git push
git push origin main
else
echo "No changes to README.md. Skipping commit."
fi