mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
chore(ci): update dependencies and add GitHub Actions workflow for syncing plugin documentation
This commit is contained in:
49
.github/workflows/build-plugin-docs.yml
vendored
Normal file
49
.github/workflows/build-plugin-docs.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Build and Sync Plugin Docs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-sync-docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout logseq repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: logseq
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: logseq/yarn.lock
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: logseq/libs
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build documentation
|
||||
working-directory: logseq/libs
|
||||
run: yarn 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
|
||||
Reference in New Issue
Block a user