diff options
| author | heilcheng <heilcheng@users.noreply.github.com> | 2026-10-16 00:07:14 +0800 |
|---|---|---|
| committer | heilcheng <heilcheng@users.noreply.github.com> | 2026-10-16 00:07:14 +0800 |
| commit | 2a666fe7ffaf6d4e8930a4c8034110519a9e4204 (patch) | |
| tree | 7f340d7ffb9016c8374212e999c8006e19dbd139 | |
| parent | d0688fc3b49f3814302aa427b00682f6756d73b2 (diff) | |
Auto-sync translated READMEs and website data when README.md changesdocs/sync-readmes-and-website
| -rw-r--r-- | .github/workflows/sync-readmes.yml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/sync-readmes.yml b/.github/workflows/sync-readmes.yml new file mode 100644 index 0000000..b6ae84a --- /dev/null +++ b/.github/workflows/sync-readmes.yml @@ -0,0 +1,48 @@ +name: Sync translations and website + +# README.md is the single source of truth for listed skills. Whenever it changes +# on main, regenerate the skill directory in every README.<lang>.md and the +# website's skills.json, and commit the result. +on: + push: + branches: [main] + paths: + - README.md + - scripts/sync_translations.py + - scripts/i18n.json + - website/scripts/build-skills.mjs + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: sync-readmes + cancel-in-progress: false + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Regenerate translations and website data + run: | + python3 scripts/sync_translations.py + node website/scripts/build-skills.mjs + + - name: Commit changes + run: | + if git diff --quiet; then + echo "Everything already in sync." + exit 0 + fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add README.*.md website/src/data/skills.json + git commit -m "Sync translated READMEs and website skill data from README.md" + git push |
