Skip to content

Commit 2c6bc74

Browse files
NAOR YUVALNAOR YUVAL
authored andcommitted
Unified docs site: landing + /spec + /reference
0 parents  commit 2c6bc74

4 files changed

Lines changed: 141 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Deploy unified MPCP docs to https://mpcp-protocol.github.io/
2+
# Site structure: / (landing) | /spec | /reference
3+
name: Deploy Docs
4+
5+
on:
6+
push:
7+
branches: [main]
8+
workflow_dispatch:
9+
repository_dispatch:
10+
types: [deploy-docs]
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout org site
20+
uses: actions/checkout@v4
21+
22+
- name: Checkout mpcp-spec
23+
uses: actions/checkout@v4
24+
with:
25+
repository: mpcp-protocol/mpcp-spec
26+
path: mpcp-spec
27+
28+
- name: Checkout mpcp-reference
29+
uses: actions/checkout@v4
30+
with:
31+
repository: mpcp-protocol/mpcp-reference
32+
path: mpcp-reference
33+
34+
- name: Setup Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: "3.11"
38+
39+
- name: Install MkDocs
40+
run: pip install -r docs-requirements.txt
41+
42+
- name: Build spec
43+
run: |
44+
cd mpcp-spec
45+
pip install -r docs-requirements.txt -q
46+
mkdocs build --config-file mkdocs.yml --strict
47+
mv site ../_site_spec
48+
49+
- name: Build reference
50+
run: |
51+
cd mpcp-reference
52+
pip install -r docs-requirements.txt -q
53+
mkdocs build --config-file mkdocs.yml --strict
54+
mv site ../_site_reference
55+
56+
- name: Assemble site
57+
run: |
58+
mkdir -p site
59+
cp index.html site/
60+
cp -r _site_spec site/spec
61+
cp -r _site_reference site/reference
62+
63+
- name: Deploy to GitHub Pages
64+
uses: peaceiris/actions-gh-pages@v4
65+
with:
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
publish_dir: ./site

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# mpcp-protocol.github.io
2+
3+
Unified documentation site for the Machine Payment Control Protocol (MPCP).
4+
5+
**URL:** https://mpcp-protocol.github.io/
6+
7+
**Structure:**
8+
- `/` — Landing page
9+
- `/spec/` — Protocol specification (from [mpcp-spec](https://github.com/mpcp-protocol/mpcp-spec))
10+
- `/reference/` — Reference implementation docs (from [mpcp-reference](https://github.com/mpcp-protocol/mpcp-reference))
11+
12+
## Setup
13+
14+
1. Create the `mpcp-protocol.github.io` repository in the mpcp-protocol organization.
15+
2. Push this content to `main`.
16+
3. GitHub Settings → Pages → Source: **Deploy from a branch** → Branch: **gh-pages**.
17+
4. The deploy workflow builds both sites and publishes on push to `main` or via manual trigger.

docs-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocs>=1.5.0
2+
mkdocs-material>=9.0.0

index.html

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>MPCP — Machine Payment Control Protocol</title>
7+
<style>
8+
* { box-sizing: border-box; }
9+
body {
10+
font-family: system-ui, -apple-system, sans-serif;
11+
max-width: 640px;
12+
margin: 0 auto;
13+
padding: 3rem 1.5rem;
14+
line-height: 1.6;
15+
color: #1e293b;
16+
}
17+
h1 { font-size: 1.75rem; font-weight: 600; margin-bottom: 0.5rem; }
18+
p { color: #475569; margin: 0 0 1.5rem; }
19+
.links {
20+
display: flex;
21+
gap: 1rem;
22+
flex-wrap: wrap;
23+
margin-top: 2rem;
24+
}
25+
.links a {
26+
display: block;
27+
padding: 1rem 1.5rem;
28+
background: #f1f5f9;
29+
color: #0f172a;
30+
text-decoration: none;
31+
border-radius: 8px;
32+
font-weight: 500;
33+
transition: background 0.2s;
34+
}
35+
.links a:hover { background: #e2e8f0; }
36+
.links a strong { display: block; margin-bottom: 0.25rem; }
37+
.links a span { font-size: 0.9rem; color: #64748b; }
38+
</style>
39+
</head>
40+
<body>
41+
<h1>Machine Payment Control Protocol</h1>
42+
<p>A protocol for verifiable machine-to-service payments.</p>
43+
44+
<div class="links">
45+
<a href="/spec/">
46+
<strong>Spec</strong>
47+
<span>Protocol specification, architecture, guides</span>
48+
</a>
49+
<a href="/reference/">
50+
<strong>Reference</strong>
51+
<span>Implementation docs, SDK, examples</span>
52+
</a>
53+
</div>
54+
</body>
55+
</html>

0 commit comments

Comments
 (0)