This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |