diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ddd531bc6c8b6df834803de32830aa3ed7bb6273..841f30ec6b8b4167b5510b9e42239c7fd2580521 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,28 +1,46 @@
+---
 # This is important to avoid stale artifacts in the build directory
 variables:
   GIT_STRATEGY: clone
 
 # Another stage is needed for the deployment (so that files are already generated by the previous job)
 stages:
- - test
- - deploy
+  - build
+  - deploy
 
-test-and-build:
+.build: &build
+  stage: build
   tags:
-   - grid5000-docker
-  image: debian:buster
+    - grid5000-docker
   script:
-   - apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs git
-   - mk-build-deps -ir -t 'apt-get -y --no-install-recommends'
-   - pip3 install -U pip # required by orjson dependency
-   - dpkg-buildpackage --no-sign
-   - cp ../*deb . # needed to upload it as artifact
+    - apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs git
+    - mk-build-deps -ir -t 'apt-get -y --no-install-recommends'
+    - pip3 install -U pip # required by orjson dependency
+    - dpkg-buildpackage --no-sign
+    - mkdir $TARGETDIR
+    - cp ../*deb $TARGETDIR/ # needed to upload it as artifact
   except:
-     - tags
+    - tags
+
+build-buster: &build-buster
+  <<: *build
+  variables:
+    TARGETDIR: "buster"
+  image: debian:buster
+  artifacts: # generate artifacts for files we want to publish
+    paths:
+      - buster
+    expire_in: '1 day'
+
+build-bullseye: &build-bullseye
+  <<: *build
+  variables:
+    TARGETDIR: "bullseye"
+  image: debian:bullseye
   artifacts: # generate artifacts for files we want to publish
-     paths:
-      - ./*.deb
-     expire_in: '1 day'
+    paths:
+      - bullseye
+    expire_in: '1 day'
 
 push-package:
   stage: deploy
@@ -33,4 +51,5 @@ push-package:
     - master
   when: manual
   script:
-    - g5k-deploy-files --only-if-tag --debian --directory deb/kwollect
+    - g5k-deploy-files --only-if-tag --debian --files 'buster/*.deb' --directory deb/kwollect
+    - g5k-deploy-files --only-if-tag --debian --files 'bullseye/*.deb' --directory deb/kwollect/bullseye