Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-ziqi committed Jul 3, 2024
1 parent 2ac99cf commit c0df8af
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 266 deletions.
54 changes: 0 additions & 54 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

37 changes: 0 additions & 37 deletions .github/ISSUE_TEMPLATE/proposal.md

This file was deleted.

13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

4 changes: 0 additions & 4 deletions .github/LICENSE_HEADER.txt

This file was deleted.

56 changes: 0 additions & 56 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

62 changes: 0 additions & 62 deletions .github/stale.yml

This file was deleted.

48 changes: 8 additions & 40 deletions .github/workflows/translate.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Sync, Translate and Update
name: Manual Translate and Update
on:
schedule:
- cron: '0 * * * *' # 每小时运行一次
workflow_dispatch:

jobs:
sync-and-translate:
translate-and-update:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository
Expand All @@ -13,58 +13,26 @@ jobs:
ref: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}

- name: Add upstream repository
run: |
git remote add upstream https://github.com/isaac-sim/IsaacLab.git
git fetch upstream
- name: Check for changes in upstream gh-pages
id: check_changes
run: |
UPSTREAM_COMMIT=$(git rev-parse upstream/gh-pages)
LOCAL_COMMIT=$(git rev-parse origin/gh-pages)
echo "UPSTREAM_COMMIT=$UPSTREAM_COMMIT" >> $GITHUB_ENV
echo "LOCAL_COMMIT=$LOCAL_COMMIT" >> $GITHUB_ENV
if [ "$UPSTREAM_COMMIT" == "$LOCAL_COMMIT" ]; then
echo "No changes in upstream."
exit 0
fi
- name: Sync fork's gh-pages with upstream
if: env.UPSTREAM_COMMIT != env.LOCAL_COMMIT
run: |
git checkout gh-pages
git merge upstream/gh-pages
git push origin gh-pages
- name: Create or checkout gh-pages-zhcn branch
if: env.UPSTREAM_COMMIT != env.LOCAL_COMMIT
- name: Checkout gh-pages-zhcn branch
run: |
if git show-ref --verify --quiet refs/heads/gh-pages-zhcn; then
git checkout gh-pages-zhcn
else
git checkout -b gh-pages-zhcn
fi
git fetch origin gh-pages-zhcn || true
git checkout gh-pages-zhcn || git checkout -b gh-pages-zhcn
- name: Setup Python
if: env.UPSTREAM_COMMIT != env.LOCAL_COMMIT
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
if: env.UPSTREAM_COMMIT != env.LOCAL_COMMIT
run: |
pip install requests
- name: Translate content to Chinese
if: env.UPSTREAM_COMMIT != env.LOCAL_COMMIT
run: |
python translate.py
- name: Commit and push changes
if: env.UPSTREAM_COMMIT != env.LOCAL_COMMIT
run: |
git add .
git commit -m "Translate changes to Chinese"
git push origin gh-pages-zhcn
git push origin gh-pages-zhcn --force

0 comments on commit c0df8af

Please sign in to comment.