showdown/.github/workflows/docs.yml

32 lines
890 B
YAML
Raw Normal View History

name: documentation
on:
push:
2022-03-27 10:33:01 +08:00
branches:
- master
paths:
- 'mkdocs.yml'
- 'docs/**'
- '.github/workflows/docs.yml'
jobs:
build_docs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Trigger external build
env:
TOKEN: ${{ secrets.DOCS_DEPLOY_KEY }}
COMMIT: ${{ github.event.head_commit.id }}
COMMITTER: ${{ github.event.head_commit.author.username }}
OWNER: showdownjs
REPO: showdownjs.github.io
run: |
curl -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${OWNER}/${REPO}/dispatches \
2022-03-27 10:33:01 +08:00
-d '{ "event_type": "e: \"'"${COMMIT}"'\" by '"${COMMITTER}"'", "client_payload": { "source": "showdown" } }'