diff --git a/.ci/ci_build.sh b/.ci/ci_build.sh
index 77f3c60..29413a5 100755
--- a/.ci/ci_build.sh
+++ b/.ci/ci_build.sh
@@ -3,6 +3,9 @@ export COMMIT_MSG=$(python3 print_deploy_message.py)
 cd ..
 make ci-build
 cd build
-zip -r LatexPackages.zip LatexPackagesBuild
+zip -r LatexPackages.zip LatexPackagesBuild -x LatexPackagesBuild.git
 tree -H '.' -I "index.html" -D --charset utf-8 -T "LatexPackages" > index.html
-cd ..
+cd LatexPackagesBuild
+git add .
+git commit -m ${COMMIT_MSG} || echo "Nothing new to commit"
+git push
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0d869e8..9be0036 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,12 +48,7 @@ build-packages:      # This job runs in the deploy stage.
     - git config --global user.name "Maximilian Keßler (via gitlab runner)"
   script:
     - echo "Building packages incrementally..."
-    - test -d PyTeX/build
     - .ci/ci_build.sh
-    - cd build/LatexPackagesBuild
-    - echo "$PWD"
-    - git add .
-    - git commit -m "${COMMIT_MESSAGE}" || echo "Nothing to commit, working dir clean"
   variables:
       GIT_SUBMODULE_STRATEGY: recursive
   artifacts: