Search code examples
gitlabgitlab-ci

Rename "pages" job in GitLab


I am following this guide in order to create a webpage from GitLab CI.

My job looks like this:

pages:
  image: maven:3.9.5-sapmachine-21
  stage: pages
  script:
    - mvn clean install site
    - mkdir public
    - mv target/site/* public/
  artifacts:
    paths:
      - public

and it is working, as I am able to see the website.

However, the job name is "pages". I would like to rename it to "documentation"

I tried changing to this:

documentation:
  image: maven:3.9.5-sapmachine-21
  stage: documentation

However, it is not working.

It seems GitLab requires this stage/job to be called "pages" specifically. How to rename it?


Solution

  • It is not possible. There is currently an open issue in their issue tracker.

    [...] in the Gitlab Pages case it [renaming jobs] doesn't [work] as the job has to be named "pages". [...]

    As the issue does not seem to be prioritized very highly, you just will have to live with a job called "pages".