Zendesk #252
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: Zendesk | |
on: | |
workflow_run: | |
workflows: ["Publish"] | |
types: [completed] | |
jobs: | |
Zendesk: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout repositiory | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Publish README.md to ZenDesk | |
run: | | |
curl https://searchspring.zendesk.com/api/v2/help_center/articles/360059001311/translations/en-us.json \ | |
-d "`npx showdown makehtml -i docs/ABOUT.md | jq -Rs '{"translation": {"title": "Snap SDK", "body": . }}'`" \ | |
-u ${{ secrets.ZenDeskAPIAuthUsername }}:${{ secrets.ZenDeskAPIAuthPassword }} -X PUT -H "Content-Type: application/json" |