Skip to content

Sync post data from yuque.com. Serverless function only work with @tencentyun

License

Notifications You must be signed in to change notification settings

lbwa/yuque-sync

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

YuQue Sync

GitHub Marketplace

Use Repository Dispatch Event to manually trigger Github Action.

Github Action

- name: Generate local file
  uses: lbwa/[email protected]
  with:
    token: ${{ secrets.ACCESS_TOKEN }}
    out-dir: 'docs'
    client-payload: ${{toJson(github.event.client_payload)}}
name description default
token A repo scoped Github Personal Access Token N/A
out-dir Where should our documentations be place in 'docs'
client-payload A request payload from Github Repository Dispatch Event 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