feat: publish gitea issue devops skill with docs and workflow templates
This commit is contained in:
204
site/index.html
Normal file
204
site/index.html
Normal file
@@ -0,0 +1,204 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Gitea Issue DevOps Agent</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #f4f7fb;
|
||||
--panel: #ffffff;
|
||||
--ink: #0f172a;
|
||||
--muted: #475569;
|
||||
--brand: #0ea5e9;
|
||||
--brand-2: #14b8a6;
|
||||
--line: #dbe5ef;
|
||||
--ok: #16a34a;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
color: var(--ink);
|
||||
background:
|
||||
radial-gradient(circle at 90% 0%, #d9f6ff 0%, transparent 40%),
|
||||
radial-gradient(circle at 10% 10%, #e3fff4 0%, transparent 30%),
|
||||
var(--bg);
|
||||
line-height: 1.6;
|
||||
}
|
||||
.wrap {
|
||||
max-width: 1050px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 20px 64px;
|
||||
}
|
||||
.hero {
|
||||
background: linear-gradient(125deg, #0f172a 0%, #0b3f63 45%, #0d7f86 100%);
|
||||
color: #f8fafc;
|
||||
border-radius: 20px;
|
||||
padding: 28px 28px 20px;
|
||||
box-shadow: 0 22px 55px rgba(2, 20, 38, 0.35);
|
||||
}
|
||||
.hero h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); }
|
||||
.hero p { margin: 0; max-width: 880px; color: #dceafd; }
|
||||
.chips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
|
||||
.chip {
|
||||
background: rgba(255,255,255,0.14);
|
||||
border: 1px solid rgba(255,255,255,0.24);
|
||||
border-radius: 999px;
|
||||
padding: 6px 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
section {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 16px;
|
||||
margin-top: 16px;
|
||||
padding: 20px;
|
||||
}
|
||||
h2 { margin: 0 0 12px; font-size: 22px; }
|
||||
h3 { margin: 18px 0 8px; font-size: 18px; }
|
||||
p, li { color: var(--muted); }
|
||||
ul { margin: 8px 0 0 20px; padding: 0; }
|
||||
code, pre {
|
||||
font-family: "Cascadia Code", Consolas, Menlo, monospace;
|
||||
font-size: 13px;
|
||||
}
|
||||
pre {
|
||||
margin: 10px 0 0;
|
||||
background: #0f172a;
|
||||
color: #d9ecff;
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
border: 1px solid #263142;
|
||||
}
|
||||
.cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
.card {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 14px;
|
||||
padding: 14px;
|
||||
background: linear-gradient(180deg, #fbfeff 0%, #f7fbff 100%);
|
||||
}
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
color: #065f46;
|
||||
background: #d1fae5;
|
||||
border: 1px solid #a7f3d0;
|
||||
}
|
||||
a { color: #0369a1; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
.ok { color: var(--ok); font-weight: 600; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<header class="hero">
|
||||
<h1>Gitea Issue DevOps Agent</h1>
|
||||
<p>
|
||||
一个把 <strong>Issue → Branch → Preview Env → 测试闭环</strong> 固化到技能与脚本中的交付方案。
|
||||
核心目标是提升交付速度,同时避免“每个分支都全量起服务”的资源浪费。
|
||||
</p>
|
||||
<div class="chips">
|
||||
<span class="chip">自动 / 半自动 / 全人工</span>
|
||||
<span class="chip">Issue 图片证据抓取</span>
|
||||
<span class="chip">变更范围智能部署</span>
|
||||
<span class="chip">槽位池自动回收</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<h2>核心价值</h2>
|
||||
<div class="cards">
|
||||
<article class="card">
|
||||
<h3>1. 分支隔离提测</h3>
|
||||
<p>每个 issue 绑定分支与预览槽位,主干环境保持稳定,避免相互覆盖。</p>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h3>2. 资源按需分配</h3>
|
||||
<p>根据变更范围判断 <code>client_only/server_only/full_stack</code>,不变更服务端就不重启服务端。</p>
|
||||
</article>
|
||||
<article class="card">
|
||||
<h3>3. 可审计闭环</h3>
|
||||
<p>每次提测都可回溯到 commit、测试结果、环境 URL、验证步骤,且合并始终由工程师人工确认。</p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>安装指南</h2>
|
||||
<h3>1) 获取技能仓库</h3>
|
||||
<pre><code>git clone https://fun-md.com/Fun_MD/devops-skills.git
|
||||
cd devops-skills</code></pre>
|
||||
<h3>2) 安装到 Codex skills</h3>
|
||||
<pre><code># Linux / macOS
|
||||
mkdir -p ~/.codex/skills
|
||||
cp -r skills/gitea-issue-devops-agent ~/.codex/skills/
|
||||
|
||||
# Windows PowerShell
|
||||
New-Item -ItemType Directory -Force $HOME\.codex\skills | Out-Null
|
||||
Copy-Item .\skills\gitea-issue-devops-agent $HOME\.codex\skills\gitea-issue-devops-agent -Recurse -Force</code></pre>
|
||||
<h3>3) 首次引导参数</h3>
|
||||
<ul>
|
||||
<li><code>repo_url</code>(仓库地址)</li>
|
||||
<li><code>api_key</code>(具备 issue 读写权限)</li>
|
||||
<li><code>mode</code>:<code>automatic</code> / <code>semi-automatic</code> / <code>manual</code></li>
|
||||
<li>可选:<code>reviewers</code>、<code>test_entry</code>、<code>deploy_env</code>、<code>health_endpoint</code>、<code>min_quality_score</code></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>工具使用说明</h2>
|
||||
<h3>issue_audit.py(拉取 issue + 图片证据)</h3>
|
||||
<pre><code>python skills/gitea-issue-devops-agent/scripts/issue_audit.py \
|
||||
--base-url https://fun-md.com \
|
||||
--repo FunMD/document-collab \
|
||||
--token <GITEA_TOKEN> \
|
||||
--state all \
|
||||
--download-attachments \
|
||||
--output-dir .tmp/issue-audit</code></pre>
|
||||
|
||||
<h3>change_scope.py(按改动范围决策部署)</h3>
|
||||
<pre><code>python skills/gitea-issue-devops-agent/scripts/change_scope.py \
|
||||
--repo-path . \
|
||||
--base-ref origin/main \
|
||||
--head-ref HEAD</code></pre>
|
||||
|
||||
<h3>preview_slot_allocator.py(分配 / 复用 / 释放槽位)</h3>
|
||||
<pre><code>python skills/gitea-issue-devops-agent/scripts/preview_slot_allocator.py \
|
||||
--state-file .tmp/preview-slots.json \
|
||||
--slots preview-a,preview-b \
|
||||
--repo FunMD/document-collab \
|
||||
--issue 48 \
|
||||
--branch dev \
|
||||
--ttl-hours 24 \
|
||||
--url-template https://{slot}.qa.example.com \
|
||||
--evict-oldest</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>.gitea/workflows 接入</h2>
|
||||
<p>
|
||||
本仓库已包含示例工作流:<code>.gitea/workflows/issue-branch-preview.yml</code> 与
|
||||
<code>.gitea/workflows/preview-slot-reclaim.yml</code>,用于完成以下自动化链路:
|
||||
</p>
|
||||
<ul>
|
||||
<li>push 到 issue 分支后:自动分配槽位 + 变更范围识别 + 选择性部署</li>
|
||||
<li>issue 关闭 / 定时任务:自动释放或回收过期槽位</li>
|
||||
</ul>
|
||||
<p class="ok">建议先在测试仓库验证工作流变量后再推广到生产仓库。</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<span class="badge">Skill Path</span>
|
||||
<p><a href="../skills/gitea-issue-devops-agent/SKILL.md">skills/gitea-issue-devops-agent/SKILL.md</a></p>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user