CI 构建完成后上报部署状态到 api.200181.xyz
Deploy to Production / pre-check (push) Successful in 41s
Deploy to Production / build (push) Successful in 4m52s
Deploy to Production / deploy-edgeone (push) Successful in 3m48s
Deploy to Production / finalize (push) Successful in 29s
Deploy to Production / notify-failure (push) Skipped

中转机 sync.sh 同步完成后会上报 phase=synced,CI 在 COS 上传后
上报 phase=built。打开 https://api.200181.xyz/api/deploy-status
即可查看国内线路是否同步完成(state: synced/syncing)。
需在 Gitea 仓库 Secrets 配置 RSS_API_TOKEN(未配置则跳过上报)。
This commit is contained in:
QunLIn committed 2026-10-03 10:40:22 +08:00
1 parent f032310188
commit e7d94c11fd
1 file changed
+22
+22
View File
@@ -288,6 +288,28 @@ jobs:
echo "📤 更新 hash 文件到腾讯云 COS..."
coscmd upload public/.build_hash /__build_hash
- name: Report deploy status (built)
# 上报「构建完成、产物已进 COS」到 api.200181.xyz 的部署状态接口,
# 中转机同步完成后会上报 phase=synced —— 打开
# https://api.200181.xyz/api/deploy-status 即可看到国内线路是否同步完。
# 需要 Gitea 仓库 Secrets 里配置 RSS_API_TOKEN = rss-robot-cf 的站点口令;
# 未配置时静默跳过上报(不影响部署)。
if: steps.check-upload.outputs.need_upload == 'true'
continue-on-error: true
env:
REPORT_TOKEN: ${{ secrets.RSS_API_TOKEN }}
run: |
if [ -z "$REPORT_TOKEN" ]; then
echo "ℹ️ 未配置 RSS_API_TOKEN,跳过部署状态上报"
exit 0
fi
BUILD_HASH="${{ steps.hash.outputs.build_hash }}"
curl -s --max-time 20 -X POST \
"https://api.200181.xyz/api/deploy-status?token=${REPORT_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"hash\":\"${BUILD_HASH}\",\"phase\":\"built\"}" \
&& echo "✅ 已上报 built: ${BUILD_HASH:0:12}"
- name: Upload to UpYun
# ┌─────────────────────────────────────────────────────────────────┐
# │ 2026-10-03 起永久跳过海外直传:本 runner 在境外,对 UpYun v0 接口 │