Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
feat: 工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
Manshawar committed Dec 19, 2024
1 parent 2f497f5 commit ed637ca
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/pages-build-sit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,16 @@ jobs:
git config --global user.email "[email protected]"
# 创建新分支
BRANCH_NAME="static"
BRANCH_NAME="deployed-docs"
git checkout -b $BRANCH_NAME
# 复制构建结果到指定目录
if [ -d "./doc_build" ]; then
cp -r ./doc_build/* .
else
echo "Warning: doc_build directory does not exist."
fi
# 删除所有文件,只保留 doc_build 的内容
rm -rf ./*
cp -r ./doc_build/* .
# 添加和提交更改
git add .
git commit -m "Deploy docs to $BRANCH_NAME" || echo "No changes to commit"
# 推送新分支
git push origin $BRANCH_NAME
git push origin $BRANCH_NAME

0 comments on commit ed637ca

Please sign in to comment.