Skip to content

Commit 0280dc5

Browse files
committed
docs: add symlink to latest generated API
1 parent 9e37064 commit 0280dc5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424
path: build/dokka
2525
- name: Generate Docs with Dokka
2626
run: ./gradlew dokkaHtmlMultiModule
27+
- name: Create symlink to latest version
28+
run: |
29+
cd build/dokka
30+
latestVersion=$(for n in *; do printf '%s\n' "$n"; done | sort | grep -E "^[0-9]+\.[0-9]+" | tail -n1)
31+
if [[ -z "${latestVersion}" ]]; then
32+
ln -sf ${latestVersion} latest
33+
fi
2734
- name: Publish to GitHub Pages
2835
uses: peaceiris/actions-gh-pages@v3
2936
with:

0 commit comments

Comments
 (0)