File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -162,21 +162,21 @@ jobs:
162162 if [ $count != '0' ]; then
163163 rm -rf docs/* || true
164164 touch docs/.nojekyll
165- cp -rv artifacts/* docs
165+ cp -rv " artifacts/*" docs
166166 fi
167167
168168 - name : 🧹 Cleanup regenerated docs
169169 if : github.event_name == 'repository_dispatch'
170170 run : |
171- version="${{ github.event.client_payload.ref }}"
172- version=${version#"refs/heads/"}
173- version=${version#"refs/tags/"}
171+ # there should only be one artifact
172+ count=`ls -1 artifacts | wc -l`
174173
175- echo "Version is $version"
174+ if [ $count == '1' ]; then
175+ version=$(ls artifacts | head -n1)
176+ echo "Version is $version"
176177
177- if [ -d "artifacts/$version" ]; then
178- rm -rf docs/$version || true
179- cp -r artifacts/$version docs/
178+ rm -rf "docs/$version" || true
179+ cp -r "artifacts/$version" docs/
180180 fi
181181
182182 - name : 🚧 Generate versions.json
You can’t perform that action at this time.
0 commit comments