Skip to content

update workflow

update workflow #4

Workflow file for this run

name: gh-pages-zhcn
on:
push:
branches:
- main
workflow_dispatch:
jobs:
gh-pages-zhcn:
runs-on: ubuntu-latest
steps:
- name: Checkout user's repo (main branch)
uses: actions/checkout@v2
with:
repository: fan-ziqi/IsaacLab
ref: main
- name: Configure git user
run: |
git config --global user.name 'fan-ziqi'
git config --global user.email '[email protected]'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools polib==1.2.0 openai==v1.3.6 python-dotenv==1.0.0 pytest==8.2.2 sphinx-intl sphinx-book-theme==1.0.1 myst-parser sphinxcontrib-bibtex==2.5.0 autodocsumm sphinx-copybutton sphinx-icon sphinx_design sphinxemoji numpy matplotlib warp-lang gymnasium sphinx-multiversion sphinx-tabs
- name: Build HTML with translations
run: |
pushd docs
sphinx-build -M html . _build -D language='zh_CN'
popd
- name: Copy generated HTML files to temporary Path
run: |
mkdir -p temp_html
cp -r docs/_build/html/* temp_html/
- name: Commit and push changes to gh-pages-zhcn branch
run: |
git checkout --orphan gh-pages-zhcn
git rm -rf .
rm -rf docs source
cp -r temp_html/* .
rm -rf temp_html
git add .
git commit -m "Update translated documentation"
git push origin gh-pages-zhcn --force