diff --git a/.github/workflows/sync-translations.yml b/.github/workflows/sync-translations.yml new file mode 100644 index 000000000..406b7623c --- /dev/null +++ b/.github/workflows/sync-translations.yml @@ -0,0 +1,26 @@ +name: Sync Translations + +on: + pull_request: + types: [closed] + paths: + - 'lectures/**/*.md' + +jobs: + sync-to-chinese: + # Only run when PR is merged (not just closed) + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Sync to Chinese Repository + uses: quantecon/action-translation-sync@v0.1 + with: + target-repo: 'quantecon/lecture-python.zh-cn' + target-language: 'zh-cn' + docs-folder: 'lectures/' + source-language: 'en' + anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} + github-token: ${{ secrets.QUANTECON_SERVICES_PAT }} + pr-labels: 'translation-sync,automated,needs-review' + pr-reviewers: 'mmcky' # Add your GitHub username \ No newline at end of file