diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3b04b483932b157cc1712846d3700d9ac857b224..7abaae27108fa7bd8230c99526326d0a96d44f9e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,22 +4,61 @@ variables:
   GIT_SUBMODULE_STRATEGY: normal
 
 stages:
+  - setup
+  - commit
+  - build
   - deploy
 
-pages:
-  stage: deploy
+default:
+  tags:
+    - inject
+
+setup:
+  stage: setup
   before_script:
     - apt-get update
     - apt-get install -y zip
+  script:
+    - ./utilities.sh # Running the script to setup directories and copy files
+    - mkdir -p files-from-repos
+    - zip -r ./files-from-repos/deployment-files.zip ./frontend/docker/nginx-deployment/
+  artifacts:
+    paths:
+      - docs/tech
+      - files-from-repos
+      - files-from-repos/deployment-files.zip
+
+commit_zip:
+  stage: commit
+  script:
+    - git config --global user.email "ci@gitlab.com"
+    - git config --global user.name "CI Bot"
+    - git add files-from-repos/deployment-files.zip
+    - git commit -m "Add authomatically deployment-files.zip"
+    - git push https://oauth2:${GITLAB_TOKEN}@gitlab.fi.muni.cz/inject/inject-docs.git HEAD:main -o ci.skip
+  dependencies:
+    - setup
+  only:
+    - main
+
+build:
+  stage: build
   script:
     - pip install poetry==1.8.2
     - poetry install
-    - poetry run ./utilities.sh
     - poetry run mkdocs build --strict --verbose --site-dir public
   artifacts:
     paths:
       - public
+  dependencies:
+    - setup
+
+pages:
+  stage: deploy
+  script:
+    - echo "Deploying pages"
+  artifacts:
+    paths:
+      - public
   only:
     - main
-  tags:
-    - inject
diff --git a/files-from-repos/deployment-files.zip b/files-from-repos/deployment-files.zip
index 351e01d504e88760eed517bec66f2940a15525c4..d485dda40018f0f631687e40e155bca1308b986f 100644
Binary files a/files-from-repos/deployment-files.zip and b/files-from-repos/deployment-files.zip differ
diff --git a/utilities.sh b/utilities.sh
index 8fc14c9ec80f548bd3864f83e38e988777b49e34..8d6137f3cb3f51f2817ff2e17ce6244e879c2f8f 100755
--- a/utilities.sh
+++ b/utilities.sh
@@ -1,11 +1,18 @@
 #!/usr/bin/env bash
+
+# Initialize and update git submodules
 git submodule init
 git submodule update --remote
 
+# Check the status of the git submodules
+git submodule status
+
+# Create necessary directories
 mkdir -p docs/tech
 mkdir -p files-from-repos
+
+# Copy files to the respective directories
 cp ./backend/definitions/README.md ./docs/tech/architecture/definitions.md
 cp ./backend/CHANGELOG.md ./docs/tech/architecture/CHANGELOG.md
 cp ./backend/openapi.yml ./docs/tech/api/openapi.yml
 cp ./frontend/docker/nginx-deployment/README.md ./files-from-repos/nginx-README.md
-zip -r ./files-from-repos/deployment-files.zip ./frontend/docker/nginx-deployment/
\ No newline at end of file