Files
logseq/.github/workflows/build-plugin-docs.yml
megayu 79c25837cb Migrate from yarn to pnpm (#12529)
* migrate yarn to pnpm

* chore: update pnpm version to 10.33.0 across all package.json files

* chore: update .npmrc and package.json for improved dependency management

* chore: unify Clojure, Node, and Java version in workflow files

* fix: enable shamefully-hoist for now and add electron, keytar to onlyBuiltDependencies

* feat: add cider/piggieback dependency and update nREPL middleware configuration to silence warnings

* ensure pnpm setup prior to node setup

* fix: update logseq/bb-tasks git SHA

* feat: add pnpm configuration for onlyBuiltDependencies in package.json

* feat: add onlyBuiltDependencies configuration for better-sqlite3 in pnpm settings

* chore: update pnpm lockfile

* fix: resolve merge conflicts

* fix: remove invisible characters from markdown headers

* fix: update .npmrc comments for clarity on lockfile usage

* Revert "feat: add cider/piggieback dependency and update nREPL middleware configuration to silence warnings"

This reverts commit 70a111936f.

* fix: remove invisible characters from various README files and add .editorconfig

* fix: clarify lockfile resolution process in SKILL.md

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-04-24 23:40:25 +08:00

60 lines
1.7 KiB
YAML

name: Build and Sync Plugin Docs
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build-and-sync-docs:
runs-on: ubuntu-latest
# Only run on manual trigger or when the commit message starts with "chore(libs): bump version"
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'chore(libs):bump version')
steps:
- name: Checkout logseq repository
uses: actions/checkout@v4
with:
path: logseq
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.33.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
cache-dependency-path: logseq/libs/pnpm-lock.yaml
- name: Install dependencies
working-directory: logseq/libs
run: pnpm install --frozen-lockfile
- name: Build documentation
working-directory: logseq/libs
run: pnpm build:docs
- name: Checkout plugins repository
uses: actions/checkout@v4
with:
repository: logseq/plugins
token: ${{ secrets.PLUGIN_DOCS_SYNC_TOKEN }}
path: plugins
- name: Sync docs to plugins repository
run: |
cp -r logseq/libs/docs/* plugins/
- name: Commit and push changes
working-directory: plugins
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --staged --quiet || git commit -m "chore: sync plugin docs from logseq/logseq@${{ github.sha }}"
git push