{"id":18356509,"url":"https://github.com/lbwa/yuque-sync","last_synced_at":"2025-04-10T01:48:58.452Z","repository":{"id":51308842,"uuid":"365773238","full_name":"lbwa/yuque-sync","owner":"lbwa","description":"Sync post data from yuque.com. Serverless function only work with @tencentyun","archived":false,"fork":false,"pushed_at":"2021-08-05T15:12:10.000Z","size":630,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-08T08:46:56.692Z","etag":null,"topics":["serverless","webhook","yuque"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbwa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-09T14:32:26.000Z","updated_at":"2023-03-08T15:03:49.000Z","dependencies_parsed_at":"2023-01-11T17:23:11.234Z","dependency_job_id":null,"html_url":"https://github.com/lbwa/yuque-sync","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":"0.10204081632653061","last_synced_commit":"54913d24271d00457d14daa8aff15a9f4da0901d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbwa%2Fyuque-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbwa%2Fyuque-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbwa%2Fyuque-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbwa%2Fyuque-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbwa","download_url":"https://codeload.github.com/lbwa/yuque-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142707,"owners_count":21054666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["serverless","webhook","yuque"],"created_at":"2024-11-05T22:10:30.949Z","updated_at":"2025-04-10T01:48:58.428Z","avatar_url":"https://github.com/lbwa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YuQue Sync\n\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-YuQue%20Sync-blue.svg?colorA=24292e\u0026colorB=0366d6\u0026style=flat\u0026longCache=true\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/yuque-sync)\n\nUse [Repository Dispatch Event](https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event) to manually trigger Github Action.\n\n## Github Action\n\n```yml\n- name: Generate local file\n  uses: lbwa/yuque-sync@v2.0.3\n  with:\n    token: ${{ secrets.ACCESS_TOKEN }}\n    out-dir: 'docs'\n    client-payload: ${{toJson(github.event.client_payload)}}\n```\n\n|      name      |                       description                       | default  |\n| :------------: | :-----------------------------------------------------: | :------: |\n|     token      |       A repo scoped Github Personal Access Token        |   N/A    |\n|    out-dir     |       Where should our documentations be place in       | `'docs'` |\n| client-payload | A request payload from Github Repository Dispatch Event |   N/A    |\n\n## Serverless function\n\n- clear building\n\n```bash\ngo clean\n```\n\n- build\n\n```bash\nGOOS=linux GOARCH=amd64 go build -o main main.go\n```\n\n- use `ctrl+shift+b` to run vscode [build task](./.vscode/tasks.json)\n\n## Notice\n\n`YuQue repository -\u003e settings -\u003e advanced settings(in the SideBar) -\u003e advanced settings(in the main content) -\u003e enable automatic publish` item should **be disabled**, otherwise, YuQue webhook would never be triggered.\n\nMore details in [YuQue Webhook](https://www.yuque.com/yuque/developer/doc-webhook).\n\n## FAQ\n\n- Q: github rest api response 404?\n- A: Please make sure [Personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) has **ALL ACCESSES** in `repo` scope, especially for private repo.\n\n## References\n\n- [create a repository dispatch event](https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event)\n- [event that trigger workflow](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbwa%2Fyuque-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbwa%2Fyuque-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbwa%2Fyuque-sync/lists"}