Manual Translate and Update #1
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: Manual Translate and Update | |
on: | |
workflow_dispatch: | |
jobs: | |
translate-and-update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout your repository | |
uses: actions/checkout@v2 | |
with: | |
repository: fan-ziqi/IsaacLab | |
ref: gh-pages | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout gh-pages-zhcn branch | |
run: | | |
git fetch origin gh-pages-zhcn || true | |
git checkout gh-pages-zhcn || git checkout -b gh-pages-zhcn | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install requests | |
- name: Translate content to Chinese | |
run: | | |
python translate.py | |
- name: Commit and push changes | |
run: | | |
git add . | |
git commit -m "Translate changes to Chinese" | |
git push origin gh-pages-zhcn --force |