@@ -38,43 +38,31 @@ jobs:
38
38
run : |
39
39
git diff --name-only HEAD~1 HEAD
40
40
41
- - name : Dry Run Language Files
42
- id : dry_run_lang
43
- run : |
44
- export DEEPSEEK_API_KEY=${{ secrets.DEEPSEEK_API_KEY }}
45
- DRY_RUN_OUTPUT=$(python scripts/update_lang.py --dry_run)
46
- echo "$DRY_RUN_OUTPUT"
47
-
48
- if [[ "$DRY_RUN_OUTPUT" == *'Total Markdown files to process: 0'* ]]; then
49
- echo "lang_updated=false" >> "$GITHUB_OUTPUT"
50
- else
51
- echo "lang_updated=true" >> "$GITHUB_OUTPUT"
52
- fi
53
-
54
- - name : Update Language Files
55
- if : steps.dry_run_lang.outputs.lang_updated == 'true'
56
- run : |
57
- export DEEPSEEK_API_KEY=${{ secrets.DEEPSEEK_API_KEY }}
58
- python scripts/update_lang.py
59
-
60
41
- name : Clean Up Credentials
61
42
run : |
62
43
rm -f ./gha-creds-*.json
63
44
64
- - name : Commit Language Files
45
+ - name : Update Language Files
65
46
if : steps.dry_run_lang.outputs.lang_updated == 'true'
66
47
run : |
67
- git config user.name "github-actions[bot]"
68
- git config user.email "github-actions[bot]@users.noreply.github.com"
69
- git add _posts/**/*.md
70
- git diff --cached --quiet || git commit -m "chore(lang): Update language files"
71
-
72
- git push || {
73
- echo "Push failed, attempting pull and merge"
74
- git pull --rebase
75
- git push
76
- }
48
+ UPDATE_LANG_OUTPUT=$(python scripts/update_lang.py --max_files 1 --model mistral | grep "Total Markdown files to process:")
49
+ echo "$UPDATE_LANG_OUTPUT"
50
+ if [[ "$UPDATE_LANG_OUTPUT" == *'Total Markdown files to process: 0'* ]]; then
51
+ echo "No language files to update."
52
+ else
53
+ git config user.name "github-actions[bot]"
54
+ git config user.email "github-actions[bot]@users.noreply.github.com"
55
+ git add _posts/**/*.md
56
+ git diff --cached --quiet || git commit -m "chore(lang): Update language files"
57
+
58
+ git push || {
59
+ echo "Push failed, attempting pull and merge"
60
+ git pull --rebase
61
+ git push
62
+ }
63
+ fi
77
64
env :
65
+ DEEPSEEK_API_KEY : ${{ secrets.DEEPSEEK_API_KEY }}
78
66
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79
67
80
68
- name : Dry Run Pdf Files
@@ -139,11 +127,6 @@ jobs:
139
127
if : steps.dry_run_pdf.outputs.pdf_updated == 'true'
140
128
run : sudo apt-get update && sudo apt-get install -y pandoc
141
129
142
- - name : Clean Up Credentials
143
- if : steps.dry_run_pdf.outputs.pdf_updated == 'true'
144
- run : |
145
- rm -f ./gha-creds-*.json
146
-
147
130
- name : Run Pdf-Pipeline.py
148
131
if : steps.dry_run_pdf.outputs.pdf_updated == 'true'
149
132
run : |
0 commit comments