Skip to content

Commit 7d3744c

Browse files
committed
Add Farsi translation sync workflow
Adds sync-translations-fa.yml that triggers when PRs merge with changes to lectures/**/*.md or _toc.yml, automatically creating translation PRs in lecture-python-programming.fa. Uses action-translation v0.10.0 with QUANTECON_SERVICES_PAT for cross-repo write access.
1 parent bb715ca commit 7d3744c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Sync Translations — Farsi
2+
# On merged PR, translate changed lectures into the Farsi target repo.
3+
name: Sync Translations (Farsi)
4+
5+
on:
6+
pull_request:
7+
types: [closed]
8+
paths:
9+
- 'lectures/**/*.md'
10+
- '_toc.yml'
11+
12+
jobs:
13+
sync:
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 2
21+
22+
- uses: QuantEcon/action-translation@v0.10.0
23+
with:
24+
mode: sync
25+
target-repo: QuantEcon/lecture-python-programming.fa
26+
target-language: fa
27+
source-language: en
28+
docs-folder: lectures
29+
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
30+
github-token: ${{ secrets.QUANTECON_SERVICES_PAT }}

0 commit comments

Comments
 (0)