Update yuque.yml #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync with Yuque | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
sync: | |
# runs-on: ubuntu-latest | |
runs-on: self-hosted | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get latest commit ID | |
id: get_commit_id | |
run: echo "::set-output name=commit_id::$(git rev-parse HEAD)" | |
- name: Call Sync API | |
run: | | |
curl --location --request POST 'http://127.0.0.1:8777/v1/rest/sync' \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"inputs": { | |
"yuqueNamespace": "eg6z1a/qpbul9", | |
"yuqueSite": "https://mosn-layotto.yuque.com/", | |
"yuqueToken":"TOdAggX2qQA20byXdw1qmfiJ2INwgATyf0uCUUM9", | |
"gitRepo": "https://github.com/${{ github.repository }}", | |
"gitDocRoot": "/", | |
"gitDocToc": "SUMMARY.md", | |
"gitCommitId": "${{ steps.get_commit_id.outputs.commit_id }}", | |
"gitBranch": "main" | |
} | |
}' |