Skip to content

Commit 738bd85

Browse files
authored
fix: a missing website must not block the F-Droid deploy (#655)
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/).
1 parent 7f7890d commit 738bd85

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎.github/workflows/nightlydepolyci.yml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
# excluded to avoid rebuilding the APK for a site-only change.
99
paths-ignore:
1010
- '.github/workflows/build-nightly.yml'
11+
# A deploy that failed (or was skipped) can be redone by hand — without this
12+
# the only way to re-deploy was an otherwise-pointless commit to main.
13+
workflow_dispatch:
1114

1215
jobs:
1316
build-and-deploy:
@@ -136,10 +139,20 @@ jobs:
136139
# Step 10b: Record the deploy and rebuild the site from this branch's own
137140
# source, then place it at the root. Additions only — repo/, metadata/ and
138141
# assets/ are untouched, so F-Droid clients are unaffected.
142+
#
143+
# Guarded: if the deploy branch does not carry the site yet (the website
144+
# PR not merged, or ever rolled back), this step skips with a warning
145+
# instead of failing. It used to die on the missing script, which
146+
# cancelled the push step below — a website problem blocking the APK
147+
# deploy, the one thing this workflow exists to do. When the site source
148+
# IS present, a build failure is still fatal so real breakage stays loud.
139149
- name: Record deploy and rebuild the website
140150
run: |
141151
set -e
142-
# website/ and scripts/ live on this branch, so they are on disk now.
152+
if [ ! -f scripts/update_build_log.py ] || [ ! -d website ]; then
153+
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?)"
154+
exit 0
155+
fi
143156
python3 scripts/update_build_log.py success \
144157
"https://github.com/${{ github.repository }}/raw/fdroid-repo/repo/nightly.${{ github.run_number }}.apk" \
145158
"${{ github.run_number }}" "$DEPLOY_SHA" "$DEPLOY_MSG"

0 commit comments

Comments
 (0)