Skip to content

Commit 82d342a

Browse files
Use gh api for docs repository dispatch
1 parent c7bae98 commit 82d342a

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,16 @@ jobs:
108108
env:
109109
GH_TOKEN: ${{ secrets.DOCS_REPO_DISPATCH_TOKEN }}
110110
run: |
111-
payload=$(jq -nc \
111+
jq -nc \
112112
--arg source_repo "$GITHUB_REPOSITORY" \
113113
--arg source_path "https://github.com/$GITHUB_REPOSITORY/releases/download/continuous/ui-bundle.zip" \
114114
--arg sha "$GITHUB_SHA" \
115115
--arg message "${{ github.event.head_commit.message }}" \
116116
--arg author "${{ github.event.head_commit.author.name }}" \
117117
--arg changed_files "${{ join(github.event.head_commit.modified, ',') }}" \
118-
'{event_type:"docs-updated",client_payload:{source_repo:$source_repo,source_path:$source_path,sha:$sha,message:$message,author:$author,changed_files:$changed_files}}')
118+
'{event_type:"docs-updated",client_payload:{source_repo:$source_repo,source_path:$source_path,sha:$sha,message:$message,author:$author,changed_files:$changed_files}}' \
119+
> dispatch-payload.json
119120
120-
curl --fail-with-body \
121-
-X POST \
122-
-H "Accept: application/vnd.github+json" \
123-
-H "Authorization: Bearer $GH_TOKEN" \
124-
https://api.github.com/repos/9kit-com/documentation/dispatches \
125-
-d "$payload"
121+
gh api repos/9kit-com/documentation/dispatches \
122+
--method POST \
123+
--input dispatch-payload.json

0 commit comments

Comments
 (0)