2022-03-16 02:28:53 +08:00
|
|
|
name: documentation
|
|
|
|
|
2022-03-21 02:39:08 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- 'mkdocs.yml'
|
|
|
|
- 'docs/**'
|
|
|
|
- '.github/workflows/docs.yml'
|
2022-03-22 06:10:34 +08:00
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
2022-03-16 02:28:53 +08:00
|
|
|
|
|
|
|
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 }}
|
2022-03-22 06:10:34 +08:00
|
|
|
COMMIT: ${{ github.event.head_commit.id }}
|
|
|
|
COMMITTER: ${{ github.event.head_commit.author.username }}
|
2022-03-16 02:28:53 +08:00
|
|
|
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-22 06:10:34 +08:00
|
|
|
-d '{ "event_type": "e: \"'"${COMMIT}"'\" by '"${COMMITTER}"'", "client_payload": { "source": "showdown" } }'
|