Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-branch

GitHub Action

YuQue Sync

v2.0.0

YuQue Sync

git-branch

YuQue Sync

Sync post data from YuQue webhook

Installation

Copy and paste the following snippet into your .yml file.

              

- name: YuQue Sync

uses: lbwa/[email protected]

Learn more about this action in lbwa/yuque-sync

Choose a version

YuQue Sync

GitHub Marketplace

Use Repository Dispatch Event to manually trigger Github Action.

Github Action

- name: Generate local file
  uses: lbwa/yuque-sync@v1
  with:
    token: ${{ secrets.ACCESS_TOKEN }}
    out-dir: 'docs'
    out-file: ${{ github.event.client_payload.title }}
    content: ${{ github.event.client_payload.post }}
name description default
token A repo scoped Github Personal Access Token N/A
out-dir Where should our documentations be place in 'docs'
out-file As generated markdown file name N/A
content As generated markdown file content N/A

Serverless function

  • clear building
go clean
  • build
GOOS=linux GOARCH=amd64 go build -o main main.go

Notice

YuQue repository -> settings -> advanced settings(in the SideBar) -> advanced settings(in the main content) -> enable automatic publish item should be disabled, otherwise, YuQue webhook would never be triggered.

More details in YuQue Webhook.

FAQ

  • Q: github rest api response 404?
  • A: Please make sure Personal access token has ALL ACCESSES in repo scope, especially for private repo.

References