GitHub Action
Logseq Publish
Publish your Logseq graph with a GitHub Action. ✨
This action is the missing piece for achieving a complete CD workflow for your public Logseq graph.
- It will load your graph and publish it into
www
(this is configurable) folder. - Next, you can then deploy
www
folder with JamesIves/github-pages-deploy-action.
Firstly, add this step to your Github workflow. You can refer to My Example Graph's workflows/main.yml as an example.
steps:
- uses: actions/checkout@v2
- name: Logseq Publish 🚩
uses: pengx17/[email protected]
- name: add a nojekyll file # to make sure asset paths are correctly identified
run: touch $GITHUB_WORKSPACE/www/.nojekyll
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: www # The folder the action should deploy.
clean: true
Whenever you push changes to your Github repo, your graph will be published to the gh-pages
branch. A few minutes later, your GitHub Pages will get updated.
src
: Publish graph src directory. Defaults to `` (empty string, root repo directory).dest
: Publish destination directory. Defaults towww
.trace
: Whether or not to generate and publish trace file for debugging. This trace file will be uploaded as an artifact to the run. Defaults totrue
.
Here is a document about the story behind this action.
TLDR., this action will start Logseq desktop App in a Docker container, automate it by Playwright and finally load & publish the graph.
Since most of the work is done in a prepared Docker container, you can refer to action.yml and adapt it in other places without the need for GitHub actions.