ci: fix dokka output path resolution for gitea wiki sync
All checks were successful
Update Wiki Documentation / generate-docs (push) Successful in 2m15s
All checks were successful
Update Wiki Documentation / generate-docs (push) Successful in 2m15s
This commit is contained in:
@@ -39,18 +39,21 @@ jobs:
|
|||||||
# Usuwamy stare pliki (oprócz .git)
|
# Usuwamy stare pliki (oprócz .git)
|
||||||
find wiki_dir -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
|
find wiki_dir -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
|
||||||
|
|
||||||
# Kopiujemy nowe pliki
|
# Kopiujemy nowe pliki ze standardowej lokalizacji Dokka MultiModule (jeśli istnieje)
|
||||||
cp -r docs/wiki/gfm/* wiki_dir/
|
# 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
|
cd wiki_dir
|
||||||
|
|
||||||
# Gitea Wiki wymaga pliku Home.md jako strony głównej.
|
# Gitea Wiki wymaga pliku Home.md jako strony głównej.
|
||||||
# Dokka GFM tworzy index.md w katalogu głównym lub modułach.
|
if [ -f "index.md" ]; then
|
||||||
# Kopiujemy zawartość do Home.md
|
mv index.md Home.md
|
||||||
if [ -f "shared/index.md" ]; then
|
|
||||||
cp shared/index.md Home.md
|
|
||||||
elif [ -f "index.md" ]; then
|
|
||||||
cp index.md Home.md
|
|
||||||
else
|
else
|
||||||
echo "# RetroHA Documentation" > Home.md
|
echo "# RetroHA Documentation" > Home.md
|
||||||
echo "Auto-generated by Dokka." >> Home.md
|
echo "Auto-generated by Dokka." >> Home.md
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ plugins {
|
|||||||
// Global Dokka configuration for Wiki
|
// Global Dokka configuration for Wiki
|
||||||
subprojects {
|
subprojects {
|
||||||
plugins.withType<org.jetbrains.dokka.gradle.DokkaPlugin> {
|
plugins.withType<org.jetbrains.dokka.gradle.DokkaPlugin> {
|
||||||
tasks.withType<org.jetbrains.dokka.gradle.AbstractDokkaTask>().configureEach {
|
// Let Dokka use its default output directories (build/dokka/gfm)
|
||||||
val format = name.substringAfter("dokka").substringBefore("MultiModule").lowercase()
|
// to ensure multi-module generation works correctly.
|
||||||
outputDirectory.set(file("${project.rootDir}/docs/wiki/$format/${project.name}"))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user