From 5e81cc3c25650bd8f46543c2817cd459c357cddd Mon Sep 17 00:00:00 2001 From: nan Date: Wed, 22 Apr 2026 15:16:09 +0800 Subject: [PATCH] fix: update tag format in deploy workflow and script to use 'wiki/' instead of 'wiki-' --- .github/workflows/deploy.yaml | 6 +++--- deploy.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c0b0c4f..3f67df9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,7 +3,7 @@ name: Deploy to Aliyun OSS on: push: tags: - - "wiki-*" # 当推送 wiki-* 开头的 tag 时触发 + - "wiki/**" # 当推送 wiki/** 开头的 tag 时触发 branches: - "main" # 当推送 main 分支时触发 @@ -18,9 +18,9 @@ jobs: # 判断触发类型 if [[ "${{ github.ref_type }}" == "tag" ]]; then - # Tag 触发:去掉 "wiki-" 前缀 + # Tag 触发:去掉 "wiki/" 前缀 TAG_NAME=${{ github.ref_name }} - CLEAN_TAG_NAME=${TAG_NAME#wiki-} + CLEAN_TAG_NAME=${TAG_NAME#wiki/} BASE_PATH="/$REPO_NAME/$CLEAN_TAG_NAME/" else # Branch 触发:使用仓库名 diff --git a/deploy.sh b/deploy.sh index 72881a4..73ddf9f 100644 --- a/deploy.sh +++ b/deploy.sh @@ -18,8 +18,8 @@ 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" +# 拼接 Tag 名称:wiki/分支名 +TAG_NAME="wiki/$BRANCH_NAME" echo "当前分支:$BRANCH_NAME"