fix(ci): Drop site/index.md from sync-about workflow (#55)
site/ is local-only (listed in .git/info/exclude), so the sed call in the Patch step aborted the workflow on every push to main with "sed: can't read site/index.md: No such file or directory". That kept the README counter from being committed and skipped the wiki sync. Patches README only now. site/ stays out of CI until the marketing site is promoted.
This commit is contained in:
@@ -41,24 +41,24 @@ jobs:
|
||||
echo "About updated."
|
||||
fi
|
||||
|
||||
- name: Patch README + site counters
|
||||
- name: Patch README counter
|
||||
if: github.event_name != 'pull_request'
|
||||
id: patch
|
||||
run: |
|
||||
n="${{ steps.count.outputs.count }}"
|
||||
sed -i -E "s/[0-9]+ (streaming-first )?indicators/${n} \1indicators/g" README.md site/index.md
|
||||
sed -i -E "s/[0-9]+ (streaming-first )?indicators/${n} \1indicators/g" README.md
|
||||
if git diff --quiet; then
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Commit & push README + site
|
||||
- name: Commit & push README
|
||||
if: steps.patch.outputs.changed == 'true' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
git config user.name "wickra-bot"
|
||||
git config user.email "wickra-bot@users.noreply.github.com"
|
||||
git add README.md site/index.md
|
||||
git add README.md
|
||||
git commit -m "chore: sync indicator count to ${{ steps.count.outputs.count }} [skip ci]"
|
||||
git push
|
||||
|
||||
|
||||
Reference in New Issue
Block a user