diff --git a/build/ci/.uml-autogen-ci.yml b/build/ci/.uml-autogen-ci.yml
index 54feeaabeaf954606acc53ea11e5a8114f1b5c88..2189eac8958c83b6a956c1454601a2e55812a1f8 100644
--- a/build/ci/.uml-autogen-ci.yml
+++ b/build/ci/.uml-autogen-ci.yml
@@ -1,14 +1,31 @@
 goplantuml:
     image: golang:1.14-alpine
-    stage: .post
+    stage: uml
     when: manual
     variables:
-        FILENAME: "ClassDiagram.puml"
+        FILENAME: "home.md"
+        WIKI_URL: "${CI_SERVER_PROTOCOL}://project_${CI_PROJECT_ID}_bot:${UML_TO_WIKI_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/${CI_PROJECT_PATH}.wiki.git"
 
     script:
     # install git
     - apk update && apk add git
     # install goplantuml
     - go get github.com/jfeliu007/goplantuml/cmd/goplantuml
+    # remove old wiki folder
+    - rm -rf "/tmp/${CI_PROJECT_NAME}.wiki"
+    # clone and move to wiki folder
+    - cd /tmp
+    - git clone "${WIKI_URL}"
+    - cd "${CI_PROJECT_NAME}.wiki"
+
+    - echo '```plantuml' > "$FILENAME"
     # run goplantuml
-    - goplantuml "${CI_PROJECT_DIR}/nucleus" >> "$FILENAME"
+    - goplantuml "${CI_PROJECT_DIR}" >> "$FILENAME"
+    - echo '```' >> "$FILENAME"
+
+    # git commit
+    - git config user.name "$GITLAB_USER_NAME"
+    - git config user.email "$GITLAB_USER_EMAIL"
+    - git add "$FILENAME"
+    - git commit -m "Auto-updated UML diagram"
+    - git push origin "HEAD:master"