mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 06:19:05 +08:00
ci: 添加自动国际化翻译的 GitHub Actions 工作流
This commit is contained in:
parent
fe8459dc87
commit
7a776eb7f6
37
.github/workflows/auto-i18n.yml
vendored
Normal file
37
.github/workflows/auto-i18n.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Auto I18N
|
||||||
|
|
||||||
|
env:
|
||||||
|
API_KEY: ${{ secrets.TRANSLATE_API_KEY}}
|
||||||
|
MODEL: ${{ vars.MODEL || 'deepseek/deepseek-v3.1'}}
|
||||||
|
BASE_URL: ${{ vars.BASE_URL || 'https://api.ppinfra.com/openai'}}
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-i18n:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Auto I18N
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 🐈⬛ Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: 📦 Setting Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: 📦 Dependencies
|
||||||
|
run: npm install openai cli-progress tsx
|
||||||
|
|
||||||
|
- name: 🏃♀️ Translate
|
||||||
|
run: tsx scripts/update-i18n.ts
|
||||||
|
|
||||||
|
- name: 🚀 Push changes
|
||||||
|
uses: ad-m/git-push@v1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: main
|
||||||
Loading…
Reference in New Issue
Block a user