File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ runs:
137137 then
138138 cd _branch
139139
140- BRANCHES=$(git branch --remotes --format=%\(refname:lstrip=-1\) )
140+ BRANCHES=$(git ls-remote --branches | grep -oE "[^/]+$" )
141141
142142 ls | while read -r branch
143143 do
@@ -146,11 +146,6 @@ runs:
146146
147147 if [[ $? -ne 0 ]]
148148 then
149- echo "Grep exit code $?"
150- echo "Deleting branch $branch"
151- echo "Branches:"
152- echo $BRANCHES
153-
154149 # Branch no longer exists; delete from GitHub Pages.
155150 rm -rf "$branch"
156151 fi
@@ -165,14 +160,8 @@ runs:
165160
166161 if [[ "$branch" == "${{ inputs.default-branch }}" ]]
167162 then
168- echo "Pre-move"
169- ls -R
170163 # Move entire _branch directory.
171164 mv _branch "../${{ inputs.pages-path }}"
172- echo "Post-move"
173- ls -R
174- echo "Site post-move"
175- ls -R "../${{ inputs.pages-path }}"
176165 else
177166 # Remove previous branch content if it exists and replace it with newly generated content.
178167 rm -rf "_branch/$branch"
You can’t perform that action at this time.
0 commit comments