From e26527fa9fafe4ea72dd31bbbe2675cd8fdaf179 Mon Sep 17 00:00:00 2001 From: Tom Cobb Date: Fri, 3 Jul 2026 15:55:52 +0000 Subject: [PATCH 1/2] fix: don't let a false trailing condition fail publish.yml steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two steps in publish.yml end their run: script with `cond && action` as the last statement. bash's exit status is the last command's, so when the condition is false (no default-branch zip to persist as a source, or no release yet to alias as stable/) the step — and the job — fails even though nothing went wrong. Hit for real on PandABlocks-FPGA: a fresh migration with no MyST-built release yet makes stable_src empty, and the Generate switcher.json step fails despite a correct assemble. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 904bdc6..c5dceb4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -269,7 +269,8 @@ jobs: done dzip="$RUNNER_TEMP/gather/$DEFAULT.zip" [ -d "$RUNNER_TEMP/site/$DEFAULT" ] && [ -f "$dzip" ] \ - && { mkdir -p "$RUNNER_TEMP/site/$SOURCES_DIR"; cp "$dzip" "$RUNNER_TEMP/site/$SOURCES_DIR/$DEFAULT.zip"; } + && { mkdir -p "$RUNNER_TEMP/site/$SOURCES_DIR"; cp "$dzip" "$RUNNER_TEMP/site/$SOURCES_DIR/$DEFAULT.zip"; } \ + || true # `generate` orders versions, writes switcher.json + index.html, and prints the # stable-alias source dir (the newest release), or "" when no release is deployed yet. @@ -280,7 +281,7 @@ jobs: set -euo pipefail stable_src=$(node "$GITHUB_WORKSPACE/.mvs/assemble/assemble.mjs" generate \ --site-dir "$RUNNER_TEMP/site" --base-url "$PAGES_URL" --required "$DEFAULT") - [ -n "$stable_src" ] && ln -s "$stable_src" "$RUNNER_TEMP/site/stable" + [ -n "$stable_src" ] && ln -s "$stable_src" "$RUNNER_TEMP/site/stable" || true - name: Upload Pages artifact uses: actions/upload-pages-artifact@v5 From 2c5e93b5de36c12625144ba87116974baf5dbddd Mon Sep 17 00:00:00 2001 From: Tom Cobb Date: Fri, 3 Jul 2026 16:10:23 +0000 Subject: [PATCH 2/2] ci: retrigger a clean run (previous rerun duplicated the github-pages artifact)