File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments