Deploy Docusaurus on GitLab Pages

Hi, I tried to deploy docusaurus v2 on gitlab pages. The site is live but apparently only with html is there anything missing in the build?

On my local machine it works perfectly and all the files in build / local and gitlab-pages are the same. Could you tell me what happened?



Continue testing here and below follow my conclusions.

To deploy docusaurus on Gitlab Pages as things are currently structured, it is necessary that the project is not within a group or subgroup. The creation of groups and subgroups is an interesting feature of GitLab and when you create a static website within a group it becomes a subdomain.

For example, the users “Slash” have a group called “Docusaurus” and within the group we have the project “docs” the url that gitlab generates for the project “docs” is

In my specific case the project was within a subgroup that we have here (general-group / subgroup-docs / project-with-dunosaurus)

I believe that module.exports does not handle this subgroup issue well and ends up breaking css and javascript. I did not get any adjustments to resolve this by specifying the url, baseUrl, organizationName and projectName tags.

Now if you upload Docusaurus at the “user root” (outside of any group) everything works fine! Just follow the same github setup instruction for docusaurus.config.js. In addition to the official doc, this video helped me: Deploy Docusaurus 2 on GitHub pages.

And configure gitlab-ci.yml as below:

image: node:14.13.1
    stage: deploy
      - yarn install
      - yarn run build
      - mv build public
          - public
      - master

# see:

After that, just push the gitlab and the docusaurus goes on the air!

In addition, gitlab can be used to create websites that you need to login to access. Just leave the repository private and indicate which group and/or user can access

Is there anything we can do to address this issue of gitlab groups and subgroups?