Skip to content

Commit 9dfc3f9

Browse files
authored
fix: harden the package table pipeline and polish the site (#153)
1 parent b07acbc commit 9dfc3f9

31 files changed

Lines changed: 1322 additions & 774 deletions

‎.github/workflows/deploy.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ on:
66
workflow_run:
77
workflows: ["Update package table"]
88
types: [completed]
9+
10+
# ghp-import force-pushes gh-pages; two runs racing each other could publish
11+
# the older build last.
12+
concurrency:
13+
group: deploy
14+
cancel-in-progress: false
15+
916
jobs:
1017
deploy:
1118
runs-on: ubuntu-latest
19+
# Only redeploy for a table refresh that actually succeeded; a push to main
20+
# deploys unconditionally.
21+
if: github.event_name == 'push' || github.event.workflow_run.conclusion == 'success'
1222
# `ghp-import --push` pushes the built site to the gh-pages branch
1323
permissions:
1424
contents: write

‎.github/workflows/update-package-table.yml‎

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
- cron: "0 */6 * * *"
66
workflow_dispatch:
77

8+
# A second run pushing over a still-running first one would fail or interleave
9+
# commits; queue instead.
10+
concurrency:
11+
group: update-package-table
12+
cancel-in-progress: false
13+
814
jobs:
915
build:
1016
runs-on: ubuntu-latest
@@ -18,37 +24,21 @@ jobs:
1824
with:
1925
persist-credentials: false
2026
- uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1
21-
# foxy and galactic are end-of-life; public/data/{foxy,galactic}.json are
22-
# committed snapshots and deliberately not regenerated here.
23-
- name: Create table noetic
24-
run: |
25-
pixi run compare-completeness noetic robostack-noetic
26-
- name: Create table humble
27-
run: |
28-
pixi run compare-completeness humble robostack-humble
29-
- name: Create table jazzy
30-
run: |
31-
pixi run compare-completeness jazzy robostack-jazzy
32-
- name: Create table kilted
33-
run: |
34-
pixi run compare-completeness kilted robostack-kilted
35-
- name: Create table rolling
36-
run: |
37-
pixi run compare-completeness rolling https://prefix.dev/robostack-rolling
38-
- name: Create table lyrical
27+
# Regenerates every distro with a dataChannel in src/data/distros.json;
28+
# a distro without one (foxy, galactic) is a committed snapshot. A failed
29+
# distro does not stop the others: whatever succeeded is still committed
30+
# below, and the run is marked failed at the end.
31+
- name: Update tables
32+
id: update
33+
continue-on-error: true
3934
run: |
40-
pixi run compare-completeness lyrical https://prefix.dev/robostack-lyrical
35+
pixi run update-tables
4136
- name: Commit changes
4237
id: commit
4338
run: |
4439
git config --local user.email "action@github.com"
4540
git config --local user.name "GitHub Action"
46-
git add public/data/noetic.json
47-
git add public/data/humble.json
48-
git add public/data/jazzy.json
49-
git add public/data/kilted.json
50-
git add public/data/rolling.json
51-
git add public/data/lyrical.json
41+
git add public/data
5242
git commit -m "Update tables"
5343
continue-on-error: true
5444
- name: Push changes
@@ -57,3 +47,6 @@ jobs:
5747
with:
5848
github_token: ${{ secrets.GITHUB_TOKEN }}
5949
branch: ${{ github.ref }}
50+
- name: Surface update failures
51+
if: steps.update.outcome == 'failure'
52+
run: exit 1

‎astro.config.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { defineConfig } from "astro/config";
33
import starlight from "@astrojs/starlight";
44
import svelte from "@astrojs/svelte";
5+
import { newestRelease } from "./src/data/distros.ts";
56

67
export default defineConfig({
78
site: "https://robostack.github.io",
@@ -46,7 +47,7 @@ export default defineConfig({
4647
{ label: "Conda", slug: "conda" },
4748
],
4849
},
49-
{ label: "Packages", link: "/lyrical.html" },
50+
{ label: "Packages", link: `/${newestRelease().name}.html` },
5051
{ label: "JupyterRos", slug: "JupyterRos" },
5152
{ label: "Support", slug: "support" },
5253
{ label: "Contributing", slug: "Contributing" },

‎pixi.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ compare-completeness = {
9191
cmd = "python scripts/compare_pkg_completeness.py",
9292
description = "Add two arguments to give it the DISTRO and CHANNEL",
9393
}
94+
update-tables = {
95+
cmd = "python scripts/compare_pkg_completeness.py --all",
96+
description = "Regenerate the package tables for every distro the pipeline maintains",
97+
}
9498

9599
[environments]
96100
default = ["site", "lint", "scripts"]

0 commit comments

Comments
 (0)