Skip to content

多言語のReadMeの自動翻訳actionsの修正 #6

多言語のReadMeの自動翻訳actionsの修正

多言語のReadMeの自動翻訳actionsの修正 #6

name: Translate README
on:
pull_request:
branches:
- develop
paths:
- README.md
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.11'
- name: Install OpenAI library
run: pip install openai
- name: Run translation script
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: python .github/scripts/translate_readme.py
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README_EN.md README_CN.md
git commit -m "Update translations" || echo "No changes to commit"
git push