feat: 加 《连续整除乘积求和》Notebook #14
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: Translate Notebooks to Chinese | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| translate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| pip install nbformat requests # nbformat for reading/writing notebooks | |
| - name: Translate Notebooks | |
| env: | |
| QWEN_API_KEY: ${{ secrets.QWEN_API_KEY }} | |
| run: | | |
| python translate-notebooks.py # Translation script | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "GitHub Actions Bot" | |
| git add . | |
| git commit -m "Translate notebooks to Chinese" | |
| git checkout -b translated # Create a new branch called 'translated' | |
| git push origin translated # Push to the 'translated' branch |