generated from icrdr/omoolab-project
feat: restructure wiki and notes, enhance Viewer component
- Removed obsolete theme index and documentation files. - Deleted unused images and canvas files. - Added new images for notes and updated canvas files. - Enhanced Viewer component with improved zoom and fullscreen functionalities. - Updated wiki configuration with new navigation and sidebar structure. - Created new index pages for notes and wiki with categorized content. - Updated links and references in markdown files to reflect new structure.
This commit is contained in:
28
deploy.sh
28
deploy.sh
@@ -1,18 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 检查 wiki 目录是否有变更
|
||||
CHANGED_FILES=$(git diff --name-only wiki && git ls-files --others --exclude-standard wiki)
|
||||
|
||||
if [ -n "$CHANGED_FILES" ]; then
|
||||
echo "检测到 wiki 目录有变更,正在提交..."
|
||||
git add wiki
|
||||
git commit -m "Update wiki"
|
||||
else
|
||||
echo "wiki 目录没有变更,跳过提交"
|
||||
fi
|
||||
|
||||
# 自动获取当前 Git 分支名
|
||||
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
# 获取仓库名称
|
||||
REMOTE_URL=$(git remote get-url origin)
|
||||
REPO_NAME=$(basename -s .git "$REMOTE_URL")
|
||||
|
||||
# 拼接 Tag 名称:wiki-分支名
|
||||
TAG_NAME="wiki-$BRANCH_NAME"
|
||||
|
||||
echo "当前分支:$BRANCH_NAME"
|
||||
echo "即将创建 Tag:$TAG_NAME"
|
||||
|
||||
# 创建本地 Tag
|
||||
git tag "$TAG_NAME"
|
||||
git tag -f "$TAG_NAME"
|
||||
|
||||
# 推送到远程仓库
|
||||
git push origin "$TAG_NAME"
|
||||
|
||||
echo -e "\n✅ Tag 创建并推送成功:$TAG_NAME"
|
||||
if git push origin -f "$TAG_NAME"; then
|
||||
echo -e "\n✅ $BRANCH_NAME 创建并推送成功,等待部署完毕"
|
||||
echo -e "\n🌍 部署地址:https://wiki.omoolab.com/$REPO_NAME/$BRANCH_NAME/"
|
||||
else
|
||||
echo -e "\n❌ $BRANCH_NAME 推送失败!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user