diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index acffa54845d8ca8a5efc848649b5d0b191f5aca0..ffdd13b061027fb7f93355be7a9dac29d7e85d92 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -126,10 +126,8 @@ integration test 4-3:
     - phpunit --configuration phpunit-integration.xml
 
 apigen docs:
-  image: wpdesknet/phpunit-woocommerce:1-0
-  stage: pre-deploy
-  dependencies:
-      - build php
+  image: vfac/apigen
+  stage: build
   artifacts:
     expire_in: 1 day
     name: "docs"
@@ -137,10 +135,8 @@ apigen docs:
       - docs/
   script:
     - ls -l
-    - php --version
-    - php composer.phar docs
-  only:
-    manual
+    - generate . ./docs
+  when: manual
 
 
 build to deploy: