Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 53 additions & 2 deletions .github/workflows/pages-technical-root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,59 @@ jobs:
test -f ./.docc-build/index.html
test -f ./.docc-build/documentation/specgraph/index.html

- name: Upload Pages artifact
- name: Archive DocC artifact
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: docc-build-pages
path: ./.docc-build

prepare-pages-artifact:
name: Prepare case-sensitive redirect artifact
if: |
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'push' &&
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
)
needs: build
runs-on: ubuntu-latest

steps:
- name: Download DocC artifact
uses: actions/download-artifact@v4
with:
name: docc-build-pages
path: ./.docc-build

- name: Add mixed-case DocC compatibility redirect
run: |
mkdir -p ./.docc-build/documentation/SpecGraph
cat > ./.docc-build/documentation/SpecGraph/index.html <<'HTML'
Comment thread
SoundBlaster marked this conversation as resolved.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="refresh" content="0; url=../specgraph/" />
<link rel="canonical" href="../specgraph/" />
<title>SpecGraph documentation</title>
</head>
<body>
<p>
Redirecting to
<a href="../specgraph/">SpecGraph DocC documentation</a>.
</p>
</body>
</html>
HTML

- name: Verify Pages artifact
run: |
test -f ./.docc-build/index.html
test -f ./.docc-build/documentation/specgraph/index.html
test -f ./.docc-build/documentation/SpecGraph/index.html

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./.docc-build
Expand All @@ -85,7 +136,7 @@ jobs:
github.event_name == 'push' &&
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
)
needs: build
needs: prepare-pages-artifact
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
3 changes: 2 additions & 1 deletion Sources/SpecGraph/Documentation.docc/ArtifactPublishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ channels.
GitHub Pages owns the technical surface:

- the repository root technical entrypoint;
- DocC documentation under `documentation/specgraph/`;
- DocC documentation under `documentation/SpecGraph/`, which redirects to the
generated lowercase DocC module path `documentation/specgraph/`;
- future generated technical artifacts that belong next to documentation.

The root page is intentionally not the product landing page.
Expand Down
2 changes: 1 addition & 1 deletion docs/github-pages-root/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h1>SpecGraph technical surface.</h1>
Current generated dashboard surface consumed by viewers.
</span>
</a>
<a class="card" href="https://0al-spec.github.io/SpecGraph/documentation/specgraph/">
<a class="card" href="https://0al-spec.github.io/SpecGraph/documentation/SpecGraph/">
<span class="label">Docs</span>
<span class="title">DocC documentation</span>
<span class="desc">
Expand Down
10 changes: 6 additions & 4 deletions docs/static_artifact_publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ surface.

GitHub Pages is not the product landing surface. The repository Pages root is
published from `docs/github-pages-root/` as a technical entrypoint with links to
the canonical DocC entrypoint at `documentation/specgraph/`, the public artifact
manifest, generated runs, and the custom landing page. Do not deploy `landing/`
to GitHub Pages root; doing so can create navigation loops where documentation
links return to the marketing page.
the operator-facing DocC entrypoint at `documentation/SpecGraph/`, the public
artifact manifest, generated runs, and the custom landing page. The DocC plugin
emits the generated module page at lowercase `documentation/specgraph/`; the
workflow publishes a mixed-case compatibility redirect so both entrypoints stay
usable. Do not deploy `landing/` to GitHub Pages root; doing so can create
navigation loops where documentation links return to the marketing page.

The source `runs/` directory remains local and unchanged. The publish bundle is
a redacted mirror: local absolute paths such as `/Users/...` are replaced with
Expand Down
8 changes: 5 additions & 3 deletions landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
.hero-caption .coord{opacity:.6}

.eyebrow{display:flex;align-items:center;gap:10px;color:var(--muted);font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase}
.eyebrow{display:flex;align-items:center;gap:10px;color:var(--muted);font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;margin:56px 0 0 0}
.eyebrow::before{content:"";width:28px;height:1px;background:currentColor;opacity:.6}

h1.display{
Expand Down Expand Up @@ -378,7 +378,9 @@
@media (max-width: 980px){
.hero-grid{grid-template-columns:1fr}
.hero-right{border-left:0;border-top:1px solid var(--rule);min-height:360px}
.hero-left{padding:64px 0 32px}
.hero-left{padding:32px 0 20px;gap:24px}
.hero-left > *:last-child{margin-top:0}
.hero .eyebrow{margin-top:16px}
.section-head{grid-template-columns:1fr;gap:24px}
.outcomes-feature{grid-template-columns:1fr}
.outcomes-feature .txt{border-left:0;border-top:1px solid var(--rule);padding:40px 0}
Expand Down Expand Up @@ -447,7 +449,7 @@
</div>

<div>
<div class="eyebrow" style="margin-top:56px">Zero-Trust Agentic Development</div>
<div class="eyebrow">Zero-Trust Agentic Development</div>
<h1 class="display">
Ship software<br>
like it&rsquo;s <span class="i">engineered,</span><br>
Expand Down
4 changes: 3 additions & 1 deletion tests/test_publish_static_artifacts_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def test_pages_technical_root_builds_docc_surface() -> None:
assert "--target SpecGraph" in workflow
assert "--hosting-base-path SpecGraph" in workflow
assert "cp docs/github-pages-root/index.html ./.docc-build/index.html" in workflow
assert "Add mixed-case DocC compatibility redirect" in workflow
assert "test -f ./.docc-build/documentation/specgraph/index.html" in workflow
assert "test -f ./.docc-build/documentation/SpecGraph/index.html" in workflow
assert "if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'" in workflow
assert "actions/upload-pages-artifact@v4" in workflow
assert "path: ./.docc-build" in workflow
Expand All @@ -116,7 +118,7 @@ def test_github_pages_root_docs_card_points_to_docc_entrypoint() -> None:
Path(__file__).resolve().parents[1] / "docs" / "github-pages-root" / "index.html"
).read_text(encoding="utf-8")

assert "https://0al-spec.github.io/SpecGraph/documentation/specgraph/" in root_page
assert "https://0al-spec.github.io/SpecGraph/documentation/SpecGraph/" in root_page
assert "https://github.com/0al-spec/SpecGraph/tree/main/docs" not in root_page


Expand Down
Loading