Auto-translate docs #12
This file contains hidden or 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: Auto-translate docs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 3 * * 1' | |
| jobs: | |
| translate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install deps | |
| run: pip install deep-translator | |
| - name: Run translation script | |
| run: python .github/scripts/auto_translate.py | |
| env: | |
| TARGET_LANGS: "hi,es,fr" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore(docs): add machine-translated docs" | |
| branch: translation/auto | |
| title: "Auto: add machine-translated docs" | |
| body: "Machine-generated translations. Please review and refine." |