Skip to content

fix(web): drop machine-specific project path fallback #3

fix(web): drop machine-specific project path fallback

fix(web): drop machine-specific project path fallback #3

name: Sync UI core to Astrolabe (Tauri)
# OpenGA's web/ is the actively-developed Astrolabe frontend. This mirrors the
# shared UI core (NOT the per-app data/API layer, the site shell, or content)
# into MathNetwork/Astrolabe (the Tauri desktop app) and opens a PR there, so
# the Tauri build keeps up with frequent changes here.
#
# Setup: add a repo secret ASTROLABE_SYNC_TOKEN — a token (classic PAT with
# `repo`, or a fine-grained token with Contents+Pull-requests: write on
# MathNetwork/Astrolabe). Without it the job will fail at checkout.
on:
push:
branches: [main]
paths:
- 'web/src/**'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout OpenGA
uses: actions/checkout@v4
with:
path: openga
- name: Checkout Astrolabe
uses: actions/checkout@v4
with:
repository: MathNetwork/Astrolabe
token: ${{ secrets.ASTROLABE_SYNC_TOKEN }}
path: astrolabe
- name: Mirror shared UI core
run: |
set -euo pipefail
SRC="openga/web/src"
DST="astrolabe/src"
# Whole directories that are shared UI (mirrored exactly, including
# deletions). These contain no Astrolabe-only files.
for d in panels plugins components/mdx stores types; do
mkdir -p "$DST/$d"
rsync -a --delete "$SRC/$d/" "$DST/$d/"
done
# Individual shared files (lib/components also hold per-app files, so
# copy only the known-shared ones — never the whole dir).
for f in \
components/MarkdownRenderer.tsx \
components/ParticleBackground.tsx \
components/ProjectStatus.tsx \
components/ProjectChapters.tsx \
lib/refView.ts \
lib/sortColors.ts; do
mkdir -p "$(dirname "$DST/$f")"
cp "$SRC/$f" "$DST/$f"
done
- name: Open / update PR in Astrolabe
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.ASTROLABE_SYNC_TOKEN }}
path: astrolabe
branch: sync/openga-ui
delete-branch: true
commit-message: "sync: UI core from OpenGA web/src"
title: "sync: UI core from OpenGA web/src"
body: |
Automated mirror of the shared UI core from
[MathNetwork/OpenGA](https://github.com/MathNetwork/OpenGA) `web/src`.
**Synced:** `panels/`, `plugins/`, `components/mdx/`, `stores/`,
`types/`, `components/MarkdownRenderer.tsx`,
`components/ParticleBackground.tsx`, `lib/refView.ts`,
`lib/sortColors.ts`.
**Not synced (per-app):** the data/API layer (`lib/api.ts`,
`lib/apiBase.ts`, `lib/server/`, `app/api/`, `hooks/`), the site
shell (`app/page.tsx`, `app/layout.tsx`, `Navbar`, `ThemeToggle`,
`app/docs/`, `components/docs/`), and `content/` / `projects/`.
Review for any conflicts with the Tauri data layer before merging.
Source: OpenGA @ ${{ github.sha }}