First you have to enable pages. (https://docs.gitlab.com/ee/user/project/pages/getting_started/pages_ui.html)
Also I used a scheduled pipeline. (https://docs.gitlab.com/ee/ci/pipelines/schedules.html)
My git repository has the following structure:
assets/
journals/
logseq/
pages/
.gitlab-ci-yml
publish.mjs
I copied publish.mjs
from https://github.com/pengx17/logseq-publish .
I had to add another delay (by adding the line await delay(1000);
) at line 124 after the line await page.click("a.menu-link >> text=Export graph");