Translate JSON #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Translate JSON | |
on: | |
push: | |
paths: | |
- 'docs/translations.json' | |
jobs: | |
translate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' # Use the latest Python 3 version | |
- name: Install dependencies | |
run: pip install requests | |
- name: Translate JSON | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: python translate.py | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Automated translation update' | |
branch: main |