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
10 changes: 10 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ on:
workflow_run:
workflows: ["Update package table"]
types: [completed]

# ghp-import force-pushes gh-pages; two runs racing each other could publish
# the older build last.
concurrency:
group: deploy
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
# Only redeploy for a table refresh that actually succeeded; a push to main
# deploys unconditionally.
if: github.event_name == 'push' || github.event.workflow_run.conclusion == 'success'
# `ghp-import --push` pushes the built site to the gh-pages branch
permissions:
contents: write
Expand Down
43 changes: 18 additions & 25 deletions .github/workflows/update-package-table.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
- cron: "0 */6 * * *"
workflow_dispatch:

# A second run pushing over a still-running first one would fail or interleave
# commits; queue instead.
concurrency:
group: update-package-table
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,37 +24,21 @@ jobs:
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1
# foxy and galactic are end-of-life; public/data/{foxy,galactic}.json are
# committed snapshots and deliberately not regenerated here.
- name: Create table noetic
run: |
pixi run compare-completeness noetic robostack-noetic
- name: Create table humble
run: |
pixi run compare-completeness humble robostack-humble
- name: Create table jazzy
run: |
pixi run compare-completeness jazzy robostack-jazzy
- name: Create table kilted
run: |
pixi run compare-completeness kilted robostack-kilted
- name: Create table rolling
run: |
pixi run compare-completeness rolling https://prefix.dev/robostack-rolling
- name: Create table lyrical
# Regenerates every distro with a dataChannel in src/data/distros.json;
# a distro without one (foxy, galactic) is a committed snapshot. A failed
# distro does not stop the others: whatever succeeded is still committed
# below, and the run is marked failed at the end.
- name: Update tables
id: update
continue-on-error: true
run: |
pixi run compare-completeness lyrical https://prefix.dev/robostack-lyrical
pixi run update-tables
- name: Commit changes
id: commit
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add public/data/noetic.json
git add public/data/humble.json
git add public/data/jazzy.json
git add public/data/kilted.json
git add public/data/rolling.json
git add public/data/lyrical.json
git add public/data
git commit -m "Update tables"
continue-on-error: true
- name: Push changes
Expand All @@ -57,3 +47,6 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Surface update failures
if: steps.update.outcome == 'failure'
run: exit 1
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import svelte from "@astrojs/svelte";
import { newestRelease } from "./src/data/distros.ts";

export default defineConfig({
site: "https://robostack.github.io",
Expand Down Expand Up @@ -46,7 +47,7 @@ export default defineConfig({
{ label: "Conda", slug: "conda" },
],
},
{ label: "Packages", link: "/lyrical.html" },
{ label: "Packages", link: `/${newestRelease().name}.html` },
{ label: "JupyterRos", slug: "JupyterRos" },
{ label: "Support", slug: "support" },
{ label: "Contributing", slug: "Contributing" },
Expand Down
4 changes: 4 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ compare-completeness = {
cmd = "python scripts/compare_pkg_completeness.py",
description = "Add two arguments to give it the DISTRO and CHANNEL",
}
update-tables = {
cmd = "python scripts/compare_pkg_completeness.py --all",
description = "Regenerate the package tables for every distro the pipeline maintains",
}

[environments]
default = ["site", "lint", "scripts"]
Loading