Files
UNITRONIX 0180f33228 docs: add GitHub wiki source and sync tooling
Maintain user-facing wiki pages in docs/wiki/ with updated BetterDesk URLs,
AGPL licensing, RBAC/org coverage, and eight new operator guides. Add sync
scripts and point docker helper TLS docs to the BetterDesk wiki.
2026-07-12 20:06:09 +02:00

39 lines
1.0 KiB
PowerShell

# Sync docs/wiki/ to GitHub Wiki (BetterDesk.wiki.git)
param(
[string]$CommitMessage = "Sync wiki from docs/wiki/",
[string]$WikiRepo = "https://github.com/UNITRONIX/BetterDesk.wiki.git",
[string]$WikiDir = "$env:TEMP\BetterDesk-wiki-sync"
)
$ErrorActionPreference = "Stop"
$RepoRoot = Split-Path $PSScriptRoot -Parent
$WikiSrc = Join-Path $RepoRoot "docs\wiki"
if (-not (Test-Path $WikiSrc)) {
Write-Error "wiki source not found: $WikiSrc"
}
if (-not (Test-Path (Join-Path $WikiDir ".git"))) {
git clone $WikiRepo $WikiDir
} else {
Push-Location $WikiDir
git pull --rebase origin master
Pop-Location
}
Get-ChildItem $WikiDir -Exclude .git | Remove-Item -Recurse -Force
Copy-Item -Path (Join-Path $WikiSrc "*") -Destination $WikiDir -Recurse -Force
Push-Location $WikiDir
git add -A
$status = git status --porcelain
if (-not $status) {
Write-Host "wiki already up to date"
Pop-Location
exit 0
}
git commit -m $CommitMessage
git push origin master
Pop-Location
Write-Host "wiki pushed to $WikiRepo"