showdown/.github/workflows/docs.yml

33 lines
931 B
YAML
Raw Normal View History

name: documentation
on:
push:
branches:
- master
paths:
- 'mkdocs.yml'
- 'docs/**'
- '.github/workflows/docs.yml'
paths-ignore:
- 'README.md'
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 \
-d '{ "event_type": "e: \"'"${COMMIT}"'\" by '"${COMMITTER}"'", "client_payload": { "source": "showdown" } }'