feat: add selectable forwarding modes and optional preview deployment

默认使用可信同源路径转发,支持界面切换隔离预览并按需部署。
This commit is contained in:
gdz66601 committed 2026-09-24 20:41:44 +08:00
1 parent fc7a0caf81
commit 5d65b34907
24 files changed
+680 -102

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
name: 部署预览 Worker
on:
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
uses: ./.github/workflows/deploy.yml
with:
deploy_preview: true
secrets: inherit
+6
View File
@@ -20,6 +20,11 @@ on:
description: 需要检出并部署的提交 SHA
required: false
type: string
deploy_preview:
description: 是否同时部署预览 Worker
required: false
default: false
type: boolean
concurrency:
group: production-deploy
@@ -49,6 +54,7 @@ jobs:
# 域名本身不是敏感信息,推荐使用 Variable;同时兼容已将它保存为 Secret 的仓库。
CUSTOM_DOMAIN: ${{ secrets.CUSTOM_DOMAIN || vars.CUSTOM_DOMAIN }}
PREVIEW_DOMAIN: ${{ vars.PREVIEW_DOMAIN }}
DEPLOY_PREVIEW_WORKER: ${{ inputs.deploy_preview && 'true' || 'false' }}
steps:
- name: Check out repository
uses: actions/checkout@v4