2626 - name : Checkout repository
2727 uses : actions/checkout@v4
2828
29+ - name : Render GitHub Pages index
30+ run : |
31+ python3 scripts/core/render_pages_index.py --output /tmp/index.html
32+
2933 - name : Setup gh-pages branch
3034 run : |
3135 git config user.name "github-actions[bot]"
@@ -87,11 +91,13 @@ jobs:
8791 base_rom = os.environ.get("BASE_ROM", "unknown")
8892 device_file = os.environ.get("DEVICE_FILE", f"builds/{device}.json")
8993 run_id = "${{ github.event.workflow_run.id }}"
90- repo = "${{ github.repository }}"
9194
9295 with open(manifest_path) as f:
9396 manifest = json.load(f)
9497
98+ manifest_release_url = manifest.get("release_url") or manifest.get("workflow_url")
99+ manifest_workflow_url = manifest.get("workflow_url", "")
100+
95101 # Load or create device index
96102 if os.path.exists(device_file):
97103 with open(device_file) as f:
@@ -100,7 +106,6 @@ jobs:
100106 device_data = {"device": device, "builds": {}}
101107
102108 # Upsert build entry
103- release_url = f"https://github.com/{repo}/actions/runs/{run_id}"
104109 device_data["builds"][base_rom] = {
105110 "android_version": manifest.get("android_version", "unknown"),
106111 "patch_version": manifest.get("patch_engine_version", "unknown"),
@@ -109,7 +114,8 @@ jobs:
109114 "git_commit": manifest.get("git_commit", ""),
110115 "checksums": manifest.get("checksums", {}),
111116 "workflow_run_id": run_id,
112- "release_url": release_url,
117+ "workflow_url": manifest_workflow_url,
118+ "release_url": manifest_release_url,
113119 }
114120 device_data["last_updated"] = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
115121
@@ -133,6 +139,9 @@ jobs:
133139 "android_version": manifest.get("android_version", "unknown"),
134140 "build_time": manifest.get("build_time", ""),
135141 "patch_version": manifest.get("patch_engine_version", "unknown"),
142+ "release_url": manifest_release_url,
143+ "workflow_url": manifest_workflow_url,
144+ "features": manifest.get("features", []),
136145 }
137146
138147 with open(index_path, "w") as f:
@@ -162,7 +171,8 @@ jobs:
162171 run : |
163172 git config user.name "github-actions[bot]"
164173 git config user.email "github-actions[bot]@users.noreply.github.com"
165- git add builds/
174+ cp /tmp/index.html index.html
175+ git add index.html builds/
166176 if git diff --cached --quiet; then
167177 echo "No changes to commit"
168178 else
0 commit comments