Skip to content

Commit aaad7f5

Browse files
authored
Update docs-sync.translate.yaml
1 parent 71db9a1 commit aaad7f5

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

.github/workflows/docs-sync.translate.yaml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,25 @@ jobs:
5050
echo "Markdown Files Missing: ${{ steps.check_missing.outputs.missing_md_files }}"
5151
echo "JSON Files Missing: ${{ steps.check_missing.outputs.missing_json_files }}"
5252
53-
- name: Read prompt from file
54-
id: prompt
53+
- name: Set up branch for PR
5554
run: |
56-
echo 'prompt<<EOF' >> $GITHUB_OUTPUT
57-
cat .github/workflows/prompt.txt >> $GITHUB_OUTPUT
58-
echo 'EOF' >> $GITHUB_OUTPUT
55+
BRANCH_NAME="translate-${{ github.run_id }}"
56+
git checkout -b $BRANCH_NAME
57+
git push -u origin $BRANCH_NAME
5958
6059
- name: Run GPT Translate
61-
uses: 3ru/gpt-translate@v1.2.2
60+
uses: BohuTANG/gpt-translate-refine@v1.3.0
6261
with:
63-
apikey: ${{ secrets.API_KEY }}
64-
model: ${{ secrets.LLM_MODEL }}
65-
temperature: ${{ secrets.TEMPERATURE }}
66-
inputFiles: "${{ steps.check_missing.outputs.missing_md_files }}${{ steps.check_missing.outputs.missing_json_files }}"
67-
outputFiles: "docs/cn/**/*.{md,json}"
68-
languages: "Simplified-Chinese"
69-
prompt: "${{ steps.prompt.outputs.prompt }}"
70-
basePath: ${{ secrets.BASE_URL }}
62+
github_token: ${{ secrets.GITHUB_TOKEN }}
63+
api_key: ${{ secrets.API_KEY }}
64+
base_url: ${{ secrets.BASE_URL }}
65+
ai_model: ${{ secrets.LLM_MODEL }}
66+
refine_ai_model: ${{ secrets.REFINE_LLM_MODEL }}
67+
target_lang: "Simplified-Chinese"
68+
system_prompt: ".github/workflows/prompt.txt"
69+
refine_system_prompt: ".github/workflows/refine_prompt.txt"
70+
TEMPERATURE: ${{ secrets.TEMPERATURE }}
71+
REFINE_TEMPERATURE: ${{ secrets.REFINE_TEMPERATURE }}
72+
input_files: "${{ steps.check_missing.outputs.missing_md_files }}${{ steps.check_missing.outputs.missing_json_files }}"
73+
output_files: "docs/cn/**/*.{md,json}"
74+
commit_message: "Add LLM Translations V2"

0 commit comments

Comments
 (0)