ci: switch to commit-message triggers (replace issue_comment)
issue_comment triggers had two problems: Gitea did not reliably fire them, and the refs/pull/N/head checkout was fragile. Commit-message keywords are simpler and guaranteed to work on any push event. Trigger keywords (add anywhere in the commit message): /test-cgal → CGAL test suite (277 tests, LOW_MEMORY_BUILD) /quality-gates → license/codespell/shellcheck/cgal-conventions /docs → Doxygen build + warning summary /links → Markdown internal link check test-fast still runs on every push (no keyword needed). All `issue_comment` event handlers and `refs/pull/N/head` checkouts removed from all three workflow files. review/** added to push branch filters so this PR branch triggers normally. CLAUDE.md CI table updated. /test-cgal /quality-gates
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
name: API Docs
|
||||
|
||||
# Trigger: write "/docs" as a comment on any pull request.
|
||||
# Also available via workflow_dispatch for manual runs outside a PR context.
|
||||
# Trigger: include "/docs" anywhere in the commit message.
|
||||
#
|
||||
# git commit -m "docs: update API examples /docs"
|
||||
#
|
||||
# Also available via workflow_dispatch for manual runs.
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- "claude/**"
|
||||
- "feature/**"
|
||||
- "review/**"
|
||||
workflow_dispatch: {}
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
@@ -14,25 +22,18 @@ on:
|
||||
# Generates Doxygen HTML from the public headers and reports warning
|
||||
# statistics. Does NOT block merges: `continue-on-error: true` ensures
|
||||
# warnings or extraction issues never fail.
|
||||
#
|
||||
# Trigger: "/docs" PR comment (or workflow_dispatch for manual runs).
|
||||
# Checkout uses refs/pull/N/head when triggered via comment.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
jobs:
|
||||
doc-build:
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request != null &&
|
||||
contains(github.event.comment.body, '/docs'))
|
||||
contains(github.event.head_commit.message, '/docs')
|
||||
runs-on: eulernest
|
||||
container:
|
||||
image: git.eulernest.eu/conformallab/ci-cpp:latest
|
||||
continue-on-error: true # never block the merge
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
|
||||
|
||||
- name: Generate API documentation
|
||||
run: doxygen Doxyfile 2>&1 | tee doxygen.log
|
||||
|
||||
Reference in New Issue
Block a user