Skip to content

Commit e2b4504

Browse files
committed
ci: fix building of only one docs version with slugs
1 parent a689b7a commit e2b4504

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/docs.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)