From 208537fb006db2c79d2615615592b0c4e72a830e Mon Sep 17 00:00:00 2001 From: Chinmay Chaudhari Date: Sun, 23 Aug 2026 12:31:15 +0530 Subject: [PATCH] fix: a missing website must not block the F-Droid deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Last night's deploy (run 32580483451) died at "Record deploy and rebuild the website": the step assumes website/ and scripts/update_build_log.py are on the deploy branch, but the PR that puts them there (#654) has not been merged yet, so the checkout brought neither and python3 exited 2. Because the step sits between `fdroid update` and the push, the failure cancelled "Push F-Droid updates" — a website problem blocked the APK deploy, the one thing this workflow exists to do. No harm to clients: the force-push never ran, so fdroid-repo still serves the previous good deploy; the nightly was simply skipped. Two changes: - the website step now checks that the site source is actually on the deploy branch and skips with a workflow warning when it is not. Absence is a known transitional state (the website PR unmerged, or rolled back), not a build failure. When the source IS present, any failure remains fatal so real site breakage stays loud instead of half-noticed - workflow_dispatch, so a missed deploy can be redone by hand — until now the only trigger was a push to main, making an otherwise-pointless commit the only way to recover a skipped nightly Verified: yaml parses; the guard condition mirrors exactly the two paths the step uses (scripts/update_build_log.py, website/). --- .github/workflows/nightlydepolyci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightlydepolyci.yml b/.github/workflows/nightlydepolyci.yml index a5250d8a..4a2508e8 100644 --- a/.github/workflows/nightlydepolyci.yml +++ b/.github/workflows/nightlydepolyci.yml @@ -8,6 +8,9 @@ on: # excluded to avoid rebuilding the APK for a site-only change. paths-ignore: - '.github/workflows/build-nightly.yml' + # A deploy that failed (or was skipped) can be redone by hand — without this + # the only way to re-deploy was an otherwise-pointless commit to main. + workflow_dispatch: jobs: build-and-deploy: @@ -136,10 +139,20 @@ jobs: # Step 10b: Record the deploy and rebuild the site from this branch's own # source, then place it at the root. Additions only — repo/, metadata/ and # assets/ are untouched, so F-Droid clients are unaffected. + # + # Guarded: if the deploy branch does not carry the site yet (the website + # PR not merged, or ever rolled back), this step skips with a warning + # instead of failing. It used to die on the missing script, which + # cancelled the push step below — a website problem blocking the APK + # deploy, the one thing this workflow exists to do. When the site source + # IS present, a build failure is still fatal so real breakage stays loud. - name: Record deploy and rebuild the website run: | set -e - # website/ and scripts/ live on this branch, so they are on disk now. + if [ ! -f scripts/update_build_log.py ] || [ ! -d website ]; then + echo "::warning::website/ or scripts/update_build_log.py not on the deploy branch — skipping the site rebuild. The F-Droid deploy continues. (Is the website PR merged into fdroid-repo?)" + exit 0 + fi python3 scripts/update_build_log.py success \ "https://github.com/${{ github.repository }}/raw/fdroid-repo/repo/nightly.${{ github.run_number }}.apk" \ "${{ github.run_number }}" "$DEPLOY_SHA" "$DEPLOY_MSG"