pengx17 / logseq-publish

Archived. Please check https://github.com/logseq/publish-spa instead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run logseq-publish inside vercel?

Xuanwo opened this issue · comments

Hi, is it possible to run logseq-publish inside vercel directly?

Based on Does Vercel support Docker deployments?, we can't run docker build inside vercel.

Based on Does Vercel support Docker deployments?, we can't run docker build inside vercel.

Hmm, if there is no Docker daemon running in the build step of Vercel, then I think it is not possible to do publish alone in Vercel.
I think eventually you need to find a CI environment that can run Docker build, e.g., GitHub Action, to commit & push to a different branch in the current repo, and let Vercel to serve that static branch.

Hmm, if there is no Docker daemon running in the build step of Vercel, then I think it is not possible to do publish alone in Vercel. I think eventually you need to find a CI environment that can run Docker build, e.g., GitHub Action, to commit & push to a different branch in the current repo, and let Vercel to serve that static branch.

Can we "split" the data export logic from logseq GUI or Electron extirely so that we can use it as js package or cli? I think that maybe more flexible.

ping @tiensonqin for advice.

I'm not familiar with neither js/electron nor Clojure, please correct me if it's impossible.

In my first attempt I do try to port the logic from cljs to is, but it seems too hard for me. I explained it in this page https://pengx17.github.io/knowledge-garden/#/page/logseq%20publish%20github%20action

I think logseq team will eventually have an official cli for publishing feature, but not too soon.

https://render.com/ can run docker, and its doc is https://render.com/docs/docker

This inspired me a lot.

Vercel's git integration is so smooth that we forget vercel could be run directly!

I managed to run vercel in github action to do deployment, and we don't need gh-pages branch any more!

Workflow

https://github.com/Xuanwo/Xuanwo/blob/master/.github/workflows/publish.yml

image

Result

https://github.com/Xuanwo/Xuanwo/runs/5033041934?check_suite_focus=true

image

Looks nice now!

wOw, thank for your all work,that’s great,as I know vercel with a power running environment,it can run php as this work created:https://github.com/juicyfx/vercel-php, but now I want advise a test app docker run site free for 1 year :https://www.pikapods.com/ but @pengx17 may try to applying to add this open source project to pikapods. just an advise

I try directly publish to vercel,I feel it is maybe slower than creating gh-pages

I feel like using GitHub Actions to publish Logseq graph could cover most use cases. You (@aiyou9) could integrate the Dockerfile in your workflow easily with pikapods.com if you want :)

I am closing the issue now.