ci: fix dokka output path resolution for gitea wiki sync
All checks were successful
Update Wiki Documentation / generate-docs (push) Successful in 2m15s

This commit is contained in:
Krzysztof Cieślik
2026-06-13 22:26:44 +02:00
parent cfe733287f
commit 786a31d3b7
2 changed files with 13 additions and 12 deletions

View File

@@ -39,18 +39,21 @@ jobs:
# Usuwamy stare pliki (oprócz .git)
find wiki_dir -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
# Kopiujemy nowe pliki
cp -r docs/wiki/gfm/* wiki_dir/
# Kopiujemy nowe pliki ze standardowej lokalizacji Dokka MultiModule (jeśli istnieje)
# lub z pojedynczych modułów
if [ -d "build/dokka/gfm" ]; then
cp -r build/dokka/gfm/* wiki_dir/
else
# Fallback dla pojedynczych modułów
cp -r shared/build/dokka/gfm/* wiki_dir/ 2>/dev/null || true
cp -r app/build/dokka/gfm/* wiki_dir/ 2>/dev/null || true
fi
cd wiki_dir
# Gitea Wiki wymaga pliku Home.md jako strony głównej.
# Dokka GFM tworzy index.md w katalogu głównym lub modułach.
# Kopiujemy zawartość do Home.md
if [ -f "shared/index.md" ]; then
cp shared/index.md Home.md
elif [ -f "index.md" ]; then
cp index.md Home.md
if [ -f "index.md" ]; then
mv index.md Home.md
else
echo "# RetroHA Documentation" > Home.md
echo "Auto-generated by Dokka." >> Home.md

View File

@@ -7,9 +7,7 @@ plugins {
// Global Dokka configuration for Wiki
subprojects {
plugins.withType<org.jetbrains.dokka.gradle.DokkaPlugin> {
tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaTask>().configureEach {
val format = name.substringAfter("dokka").substringBefore("MultiModule").lowercase()
outputDirectory.set(file("${project.rootDir}/docs/wiki/$format/${project.name}"))
}
// Let Dokka use its default output directories (build/dokka/gfm)
// to ensure multi-module generation works correctly.
}
}