diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b573a65..9f3ef37 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,15 @@ name: Deploy UburNode on: workflow_dispatch: + inputs: + branch: + description: 要部署的分支 + required: false + default: main push: branches: - main + - dev permissions: contents: read @@ -40,7 +46,7 @@ jobs: set -euo pipefail DEPLOY_DIR="${{ secrets.DEPLOY_PATH || env.DEPLOY_DIR }}" GIT_REPO="${{ env.GIT_REPO }}" - DEPLOY_BRANCH="${{ secrets.DEPLOY_BRANCH || env.DEPLOY_BRANCH }}" + DEPLOY_BRANCH="${{ secrets.DEPLOY_BRANCH || (github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref_name) }}" if [ ! -d "$DEPLOY_DIR/.git" ]; then if [ -d "$DEPLOY_DIR" ] && [ -n "$(ls -A "$DEPLOY_DIR" 2>/dev/null)" ]; then diff --git a/deploy/.deploy-marker b/deploy/.deploy-marker new file mode 100644 index 0000000..5ad79b8 --- /dev/null +++ b/deploy/.deploy-marker @@ -0,0 +1,4 @@ +# 自动部署验证标记(勿手动编辑,由 CI 合入时更新) +deploy_id=qlj-dev-0624-deploy-test +updated_at=2026-06-24T00:00:00Z +purpose=verify-github-actions-auto-deploy