Skip to content

Commit 951d946

Browse files
committed
fix: 🗑️ keep trying to make the commit not terrible
1 parent f1e7de5 commit 951d946

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

action.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,17 @@ runs:
138138
cp -r badges /tmp/badges-backup
139139
git checkout --orphan ${{ inputs.pages-branch }}
140140
git rm -rf . || true
141-
# Restore badges after cleanup
142-
cp -r /tmp/badges-backup badges
143141
fi
144142
145-
# Create the badges directory
143+
# Create the badges directory for pages
146144
mkdir -p ${{ inputs.pages-badges-dir }}
147145
148-
# Copy badges to the pages branch
149-
cp badges/*.json ${{ inputs.pages-badges-dir }}/
146+
# Copy badges to the pages directory from backup or current location
147+
if [ -d "/tmp/badges-backup" ]; then
148+
cp /tmp/badges-backup/*.json ${{ inputs.pages-badges-dir }}/
149+
else
150+
cp badges/*.json ${{ inputs.pages-badges-dir }}/
151+
fi
150152
echo "📋 Copied badges to ${{ inputs.pages-badges-dir }}/"
151153
152154
# Check if there are changes to commit

0 commit comments

Comments
 (0)