From 776384e28da072fcfcb7c3ff5403d4674a8c460a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 22:25:16 +0000 Subject: [PATCH] [private-preview] Publishing workflows: start from the live site when the artifact is gone; 90-day artifacts; site manifest split-beta, emulator-beta, public-release and installer-pages: the download of the pinned run's github-pages artifact may fail (continue-on-error); the next step (tools/fetch_live_site.py restore) leaves build/released/artifact.tar as the downloaded artifact or, when it expired or is older than the live site, the live site fetched and checked. The steps after it are unchanged. Every deploy (those four, emulator, private-preview, usb-input-release) now writes site-manifest.json (every file, size, SHA-256) and keeps its Pages artifact 90 days instead of 1. Pushing this runs "Publish installer pages" (its workflow file changed): it republishes the live site as it is, plus site-manifest.json. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh --- .github/workflows/emulator-beta.yml | 12 ++++++++++++ .github/workflows/emulator.yml | 3 +++ .github/workflows/installer-pages.yml | 12 ++++++++++++ .github/workflows/private-preview.yml | 3 +++ .github/workflows/public-release.yml | 12 ++++++++++++ .github/workflows/split-beta.yml | 12 ++++++++++++ .github/workflows/usb-input-release.yml | 3 +++ 7 files changed, 57 insertions(+) diff --git a/.github/workflows/emulator-beta.yml b/.github/workflows/emulator-beta.yml index ef6628db..f16d56a1 100644 --- a/.github/workflows/emulator-beta.yml +++ b/.github/workflows/emulator-beta.yml @@ -43,12 +43,21 @@ jobs: f.write('site_run_id='+str(m['site_run_id'])+'\n') PY - name: Published site + id: site + continue-on-error: true uses: actions/download-artifact@v4 with: name: github-pages run-id: ${{ steps.pin.outputs.site_run_id }} github-token: ${{ github.token }} path: build/released + - name: Published site to start from (the artifact; the live site when it expired or is older) + # The Pages artifact of the pinned run expires; the live site does not. tools/fetch_live_site.py leaves at + # build/released/artifact.tar the downloaded artifact, or the live site fetched file by file and checked + # (site-manifest.json, SHA256SUMS, versions.json); it stops the run rather than start from a partial site. + run: | + [ "${{ steps.site.outcome }}" = success ] || rm -rf build/released + python3 tools/fetch_live_site.py restore --artifact build/released/artifact.tar - uses: actions/checkout@v4 with: ref: ${{ steps.pin.outputs.source }} @@ -92,9 +101,12 @@ jobs: run: | pip install --timeout 30 --retries 2 playwright==1.58.0 python3 -u web/emu/browser-beta-test.py build/pages/emu "$(python3 -c "import json;print(json.load(open('web/EMULATOR_BETA.json'))['version'])")" + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04 diff --git a/.github/workflows/emulator.yml b/.github/workflows/emulator.yml index 71cd95c0..bf931a2e 100644 --- a/.github/workflows/emulator.yml +++ b/.github/workflows/emulator.yml @@ -215,9 +215,12 @@ jobs: cp docs/navigation-map.png docs/navigation-map.svg docs/navigation-map.es.png docs/navigation-map.es.svg build/pages/docs/ # (0.9.12) the interactive manual (web/manual: the panel, every command, the map, what's new) at manual/ python3 web/make_site.py manual build/pages + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04 diff --git a/.github/workflows/installer-pages.yml b/.github/workflows/installer-pages.yml index 8814d1a1..9197d80c 100644 --- a/.github/workflows/installer-pages.yml +++ b/.github/workflows/installer-pages.yml @@ -23,20 +23,32 @@ jobs: with: python-version: '3.13' - name: Download current published site + id: site + continue-on-error: true uses: actions/download-artifact@v4 with: name: github-pages run-id: 42801458263 github-token: ${{ github.token }} path: build/released + - name: Published site to start from (the artifact; the live site when it expired or is older) + # The Pages artifact of the pinned run expires; the live site does not. tools/fetch_live_site.py leaves at + # build/released/artifact.tar the downloaded artifact, or the live site fetched file by file and checked + # (site-manifest.json, SHA256SUMS, versions.json); it stops the run rather than start from a partial site. + run: | + [ "${{ steps.site.outcome }}" = success ] || rm -rf build/released + python3 tools/fetch_live_site.py restore --artifact build/released/artifact.tar - name: Update only the two installer pages run: | mkdir -p build/pages tar -xf build/released/artifact.tar -C build/pages python3 tools/patch_installer_downloads.py build/pages + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04 diff --git a/.github/workflows/private-preview.yml b/.github/workflows/private-preview.yml index 1b7e9253..20d8f02a 100644 --- a/.github/workflows/private-preview.yml +++ b/.github/workflows/private-preview.yml @@ -94,9 +94,12 @@ jobs: run: | pip install --timeout 30 --retries 2 playwright==1.58.0 python3 -u web/emu/browser-additive-test.py build/pages/emu + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04 diff --git a/.github/workflows/public-release.yml b/.github/workflows/public-release.yml index 5d614178..d18ede5d 100644 --- a/.github/workflows/public-release.yml +++ b/.github/workflows/public-release.yml @@ -36,12 +36,21 @@ jobs: path: build/candidate persist-credentials: false - name: Frozen published site + id: site + continue-on-error: true uses: actions/download-artifact@v4 with: name: github-pages run-id: 42764289783 github-token: ${{ github.token }} path: build/released + - name: Published site to start from (the artifact; the live site when it expired or is older) + # The Pages artifact of the pinned run expires; the live site does not. tools/fetch_live_site.py leaves at + # build/released/artifact.tar the downloaded artifact, or the live site fetched file by file and checked + # (site-manifest.json, SHA256SUMS, versions.json); it stops the run rather than start from a partial site. + run: | + [ "${{ steps.site.outcome }}" = success ] || rm -rf build/released + python3 tools/fetch_live_site.py restore --artifact build/released/artifact.tar - name: JieLi toolchain cache uses: actions/cache@v4 with: @@ -158,9 +167,12 @@ jobs: with: name: public-firmware path: build/candidate/build/felucca.fwsc + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04 diff --git a/.github/workflows/split-beta.yml b/.github/workflows/split-beta.yml index d18e4e19..119c5c5f 100644 --- a/.github/workflows/split-beta.yml +++ b/.github/workflows/split-beta.yml @@ -44,12 +44,21 @@ jobs: path: build/candidate persist-credentials: false - name: Frozen published site + id: site + continue-on-error: true uses: actions/download-artifact@v4 with: name: github-pages run-id: 42891985548 github-token: ${{ github.token }} path: build/released + - name: Published site to start from (the artifact; the live site when it expired or is older) + # The Pages artifact of the pinned run expires; the live site does not. tools/fetch_live_site.py leaves at + # build/released/artifact.tar the downloaded artifact, or the live site fetched file by file and checked + # (site-manifest.json, SHA256SUMS, versions.json); it stops the run rather than start from a partial site. + run: | + [ "${{ steps.site.outcome }}" = success ] || rm -rf build/released + python3 tools/fetch_live_site.py restore --artifact build/released/artifact.tar - name: Exact tested firmware uses: actions/download-artifact@v4 with: @@ -124,9 +133,12 @@ jobs: with: name: voice-split-beta path: build/candidate/build/felucca.fwsc + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04 diff --git a/.github/workflows/usb-input-release.yml b/.github/workflows/usb-input-release.yml index 9b45ba60..6cb8932c 100644 --- a/.github/workflows/usb-input-release.yml +++ b/.github/workflows/usb-input-release.yml @@ -135,9 +135,12 @@ jobs: with: name: usb-input-fix2 path: build/candidate/build/felucca.fwsc + - name: Site manifest (every file with its SHA-256, for the next publish to recover the site exactly) + run: python3 tools/fetch_live_site.py manifest build/pages - uses: actions/upload-pages-artifact@v3 with: path: build/pages + retention-days: 90 # (the default is 1 day: the next publish starts from this artifact) deploy: needs: build runs-on: ubuntu-24.04