Skip to content

Instantly share code, notes, and snippets.

@MarkusPic
Last active June 13, 2023 01:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkusPic/a757e52b2be8013161165483ad9bf4ed to your computer and use it in GitHub Desktop.
Save MarkusPic/a757e52b2be8013161165483ad9bf4ed to your computer and use it in GitHub Desktop.
logseq-publish-for-gitlab
pages:
image: ghcr.io/pengx17/logseq-base:master
stage: deploy
script:
- mkdir public
- mv publish.mjs /home/logseq/publish.mjs
- cd /home/logseq
- "xvfb-run node /home/logseq/publish.mjs -p $CI_PROJECT_DIR -t $CI_PROJECT_DIR/public/build_trace.txt -o $CI_PROJECT_DIR/public"
artifacts:
paths:
- public
only:
- schedules

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");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment