From 73f08e3b16da5f00fbf2f797f5b7a04f8cce4e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cie=C5=9Blik?= Date: Sat, 13 Jun 2026 21:49:39 +0200 Subject: [PATCH] ci: add wiki documentation sync --- .gitea/workflows/documentation.yml | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/documentation.yml diff --git a/.gitea/workflows/documentation.yml b/.gitea/workflows/documentation.yml new file mode 100644 index 0000000..9f607fb --- /dev/null +++ b/.gitea/workflows/documentation.yml @@ -0,0 +1,45 @@ +name: Update Wiki Documentation + +on: + push: + branches: + - main + +jobs: + generate-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build Markdown Docs + run: | + chmod +x gradlew + ./gradlew dokkaGfm + + - name: Sync to Wiki + run: | + git config --global user.name "Gitea Bot" + git config --global user.email "bot@gitea.io" + + WIKI_URL="https://${{ gitea.token }}@gitea.archvium.eu/KrzysztofC/Retro_HA.wiki.git" + + git clone "$WIKI_URL" wiki_dir + + rm -rf wiki_dir/* + cp -r docs/wiki/gfm/* wiki_dir/ + + cd wiki_dir + git add . + if ! git diff --cached --quiet; then + git commit -m "Auto-update wiki from CI/CD" + git push origin master + else + echo "No changes to sync." + fi