Files
action-sandbox/deploy.sh
nan 0e5b3527b0
All checks were successful
Deploy to Aliyun OSS / deploy (push) Successful in 24s
add vitepress and workflow
2026-04-21 20:02:53 +08:00

18 lines
381 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 自动获取当前 Git 分支名
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
# 拼接 Tag 名称:wiki-分支名
TAG_NAME="wiki-$BRANCH_NAME"
echo "当前分支:$BRANCH_NAME"
echo "即将创建 Tag:$TAG_NAME"
# 创建本地 Tag
git tag "$TAG_NAME"
# 推送到远程仓库
git push origin "$TAG_NAME"
echo -e "\n✅ Tag 创建并推送成功:$TAG_NAME"