Lint and reload / lint-and-reload (push) Failing after 2s
Validates YAML/required fields/duplicate ids/requirement types with yq+jq against the exact shape content.rs parses (not a full schema check - that would mean building portal just to lint content), then publishes portal.content.reload over NATS so every running portal instance picks up the change without a restart (portal's own content::watch_for_reload, added alongside this).
22 lines
632 B
YAML
22 lines
632 B
YAML
name: Lint and reload
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-reload:
|
|
runs-on: bare
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Lint questions
|
|
run: ./lint.sh questions
|
|
|
|
# Tells every running portal instance to re-fetch and atomically
|
|
# swap in the new content - see content::watch_for_reload in the
|
|
# portal repo. Fire and forget: no reply expected, no payload
|
|
# needed (the subject alone is the whole message).
|
|
- name: Tell portal to reload content
|
|
run: nats pub portal.content.reload '' --server "nats://infra:${{ secrets.NATS_TOKEN }}@127.0.0.1:4222"
|