fix(ci, flatter): fixed building nightly repo

This commit is contained in:
2026-07-05 18:31:38 +03:00
parent 08153e4a1c
commit a728671b01
+2 -3
View File
@@ -121,13 +121,12 @@ jobs:
mkdir -p release-bundles mkdir -p release-bundles
# Inherit existing OSTree repository to preserve previous branches (e.g. stable vs nightly) # Inherit existing OSTree repository to preserve previous branches (e.g. stable vs nightly)
if [ -f "gh-pages-branch/config" ]; then # Only inherit if objects/ exists, otherwise it's a corrupted/empty repo due to Git ignoring empty folders
if [ -d "gh-pages-branch/objects" ]; then
echo "Found existing OSTree repository. Copying..." echo "Found existing OSTree repository. Copying..."
cp -r gh-pages-branch pages-repo cp -r gh-pages-branch pages-repo
# Clean up the .git folder so it doesn't interfere # Clean up the .git folder so it doesn't interfere
rm -rf pages-repo/.git rm -rf pages-repo/.git
# Recreate empty directories that git might have ignored
mkdir -p pages-repo/objects pages-repo/refs
else else
echo "Initializing new OSTree repository..." echo "Initializing new OSTree repository..."
mkdir -p pages-repo mkdir -p pages-repo