Skip to content

Update README.md

Update README.md #68

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