Merge pull request #52 from LeoLin4258/update-llama-cpp-docs #35
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: Sync Pages and Components Directory to RWKVCN | |
on: | |
push: | |
branches: | |
- main # 监听 RWKVCN-DOCS 仓库的 main 分支 | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout RWKVCN-DOCS repo | |
uses: actions/checkout@v2 | |
- name: Sync Directories to RWKVCN | |
env: | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
run: | | |
# 克隆 RWKVCN 仓库 | |
git clone --branch docs https://[email protected]/LeoLin4258/rwkvcn.git rwkvcn | |
cd rwkvcn | |
# 确保我们在 rwkvcn-docs 分支上,如果不存在则创建 | |
git fetch origin rwkvcn-docs || true | |
if git rev-parse --verify origin/rwkvcn-docs >/dev/null 2>&1; then | |
git checkout rwkvcn-docs | |
git pull origin rwkvcn-docs | |
else | |
git checkout -b rwkvcn-docs | |
fi | |
# 配置 Git 用户信息 | |
git config user.name "LeoLin4258" | |
git config user.email "[email protected]" | |
# 同步文件 | |
cd .. | |
rsync -av --delete --exclude='.git' pages/ rwkvcn/pages/ | |
rsync -av --delete --exclude='.git' components/docs/ rwkvcn/components/docs/ | |
# 提交更改 | |
cd rwkvcn | |
git add pages/ components/docs/ | |
git commit -m "Sync pages and components/docs directories from RWKVCN-DOCS main to rwkvcn-docs" | |
# 使用 force push 来确保更新成功 | |
git push -f origin rwkvcn-docs |