-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.25 KB
/
trigger-docs.yml
File metadata and controls
42 lines (37 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Trigger docs rebuild on ancplua-docs when this repo changes
#
# When source code changes in ancplua-claude-plugins, this workflow
# sends a repository_dispatch event to ancplua-docs to rebuild documentation.
#
# Requirements:
# - DOCS_TRIGGER_PAT secret must be a PAT with repo scope for ANcpLua/ancplua-docs
#
# Security: External inputs passed via env to prevent code injection
name: Trigger Docs Rebuild
on:
push:
branches: [main]
release:
types: [published]
workflow_dispatch:
jobs:
trigger-docs:
name: Trigger ancplua-docs rebuild
runs-on: ubuntu-latest
steps:
- name: Send repository_dispatch to ancplua-docs
env:
GH_TOKEN: ${{ secrets.DOCS_TRIGGER_PAT }}
SOURCE_REF: ${{ github.ref }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/ANcpLua/ancplua-docs/dispatches \
-f "event_type=docs-update" \
-f "client_payload[source]=ancplua-claude-plugins" \
-f "client_payload[ref]=$SOURCE_REF"
echo "Triggered docs rebuild on ancplua-docs"
echo "Source: ancplua-claude-plugins"
echo "Ref: $SOURCE_REF"