Files
aurora-admin/.github/workflows/deploy-pages.yml
T
aurora-admin f1fbfc2ddb
Regression / regression (push) Canceled after 0s
feat(品牌标识): 几何 K 图标(favicon/顶栏标记/theme-color) + 并行会话成果入库
## 品牌标识(本次会话)

起因:品牌此前没有任何图形标识 —— 唯一 favicon 是内联 data-URI 里的字母「A」,
那是 v2.0.0「Aurora Admin → Kole UI」改名漏掉的一处(PC 顶栏也是「A」,
移动端站已是「K」;移动端文档站则完全没有 favicon)。

- 几何:24 网格三个互不接触的笔画(竖 + 两斜),圆头描边;
  描边 2.25 → 16px 标签页尺寸下正好 1.5px = 规范原文「描边1.5px」
- 取色分两套(刻意):favicon 硬编码品牌蓝/白(渲染在浏览器标签栏,不继承 kole-dark);
  顶栏标记走 currentColor(实测暗色下自动转 rgb(20,22,28))
- 新增 theme-color 双条(light #FFFFFF / dark #1C1F26,取 --kole-color-card-bg)
- 修 site/app.js hero 标语 KOLE ADMIN → KOLE UI(改名变形残留)
- 移动端 7 个模板补 favicon(此前计数 0)

验收:门禁 9 条全 OK(site-routing/site-routes/mobile-docs/mobile-site/isolation/
theme/nav/i18n/icons);PC 回归 1464/1464 · 移动端 807/807,各连跑 8 次一致;
两端 favicon 405 字节逐字节一致;PC 站控制台错误 1→0。

## 并行会话成果(本次一并入库)

- 图标系统:2576 图标(TDesign/Element Plus,MIT)+ 11 端注入 + 5 个构建门禁工具
  + IconPreview 预览页 + ICON-SPEC.md 冻结规格
- 移动端平台:47 组件 × 6 端 + 文档站 53 页 + 隔离门禁
- PC 组件:103 个大后台组件 / 组件11 批次
- uni-app:PC 端试点 + 移动端端实现 + 真实编译验证

## 工程

- .gitignore 补 .scratch/ 与 .zcode-preexisting-*.txt(会话中间产物,实测 9.1MB,不入库)
- CHANGELOG 补品牌标识条目
- ROADMAP 登 S8-P4(品牌标识任务包 + og:image/apple-touch-icon 未做部分)
2026-09-21 10:05:48 +08:00

116 lines
5.0 KiB
YAML
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.
name: Deploy to GitHub Pages
# 部署必须等 Regression 通过 —— 用 `workflow_run` 而不是 `push`:
# 这样既把测试变成了部署的硬门槛,又不必把 Regression 拆成可复用工作流、
# 也不会让同一套测试在每次推 main 时跑两遍。手动部署仍走 workflow_dispatch(有意保留的逃生口)。
on:
workflow_run:
workflows: ["Regression"]
types: [completed]
branches: [main]
workflow_dispatch:
permissions:
contents: read
actions: read # 跨工作流下载 Regression 的 report 产物需要
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
# workflow_run 触发时必须测试通过;手动触发不受此限。
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
# workflow_run 的 github.sha 指向默认分支头,必须显式取"被测试的那个提交"
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- name: Configure Pages
uses: actions/configure-pages@v5
# 首页通过率卡片读的是 tests/report.json。那份文件是入库的,直接用它等于让页面显示
# "提交里的数字"而不是"刚刚验过的数字"。改为取本次 Regression 产出的那份;
# 取不到(如手动触发、产物过期)就回退到提交版,不让部署因此变脆。
- name: Fetch the report produced by the Regression run
if: github.event_name == 'workflow_run'
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: regression-report
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path: ci-report
- name: Assemble minimal Pages package
shell: bash
run: |
set -euo pipefail
rm -rf site-dist
mkdir -p site-dist/site site-dist/frameworks site-dist/.design_library/kole-ui
cp index.html sitemap.xml site-dist/
cp -a site/. site-dist/site/
cp -a frameworks/. site-dist/frameworks/
# The documentation routes are History-API paths with no "#"
# (/site/component/button/h5): there is no such file on disk, and Pages has no
# rewrite config, so it answers unknown paths with /404.html from the publish root.
# A copy of the SPA shell therefore keeps deep links and in-page refreshes working —
# the shell derives its site root from the URL, so it loads correctly from there.
cp site/index.html site-dist/404.html
# The live documentation reads these token, aggregate CSS and contract assets.
cp .design_library/kole-ui/colors_and_type.css site-dist/.design_library/kole-ui/
cp .design_library/kole-ui/components.css site-dist/.design_library/kole-ui/
cp .design_library/kole-ui/css.json site-dist/.design_library/kole-ui/
cp -a .design_library/kole-ui/components site-dist/.design_library/kole-ui/
# Pages excludes repository-only tests, raw specifications, metadata and reports.
rm -rf site-dist/.git site-dist/.github site-dist/.design_library/kole-ui/specs \
site-dist/.design_library/kole-ui/agent-reports site-dist/.design_library/kole-ui/preview \
site-dist/.design_library/kole-ui/ui_kits site-dist/tests
# Exception: the homepage pass-rate card fetches ../tests/report.json. Without this
# single file the card silently renders nothing (the fetch 404s and is swallowed),
# so it must be copied back after the tests/ purge above.
# 优先用 Regression 本次产出的报告,取不到才回退到提交里的那份。
REPORT=tests/report.json
if [ -f ci-report/tests/report.json ]; then
REPORT=ci-report/tests/report.json
echo "report source: this Regression run's artifact"
else
echo "::warning::report source: committed tests/report.json (Regression artifact unavailable)"
fi
mkdir -p site-dist/tests
cp "$REPORT" site-dist/tests/report.json
find site-dist -type f \( -name '*.ps1' -o -name '*.yml' -o -name '*.yaml' \) -delete
test -f site-dist/404.html
test -f site-dist/site/index.html
test -f site-dist/site/data.json
test -f site-dist/site/tokens/tokens.css
test -f site-dist/tests/report.json
test "$(find site-dist/site/components -maxdepth 1 -name '*.html' | wc -l)" -eq 79
du -sh site-dist
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site-dist
- id: deployment
uses: actions/deploy-pages@v4