Merge pull request #1150 from OffbandMesh/feat/1148-docs-notify

ci(#1148): tell offband-site when the app manual changes
fix/1166-location-radio-truth
Strycher 2 weeks ago committed by GitHub
commit d8043c576c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,35 @@
name: Notify the docs site
# A change to the app manual on dev tells offband-site to rebuild and publish
# docs.offband.org/app/ (#1148, offband-site#77). GitHub cannot trigger a
# workflow in another repository, so this side sends a repository dispatch. The
# site validates the payload and builds the current dev head itself; the SHA is
# a notification, not a checkout.
on:
push:
branches: [dev]
paths: ['docs/user/**']
# No workflow_dispatch: it would run a branch's own copy of this file with the
# PAT. To republish by hand, run offband-site's Documentation workflow instead.
permissions:
contents: read
jobs:
notify:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
# The payload is offband-site's version-1 contract (its scripts/build_docs.py
# validate_event): exactly these four fields, or the site refuses the run.
- name: Send the app-docs dispatch to offband-site
env:
GH_TOKEN: ${{ secrets.PROJECT_PAT }}
SOURCE_SHA: ${{ github.sha }}
run: >-
gh api repos/OffbandMesh/offband-site/dispatches --method POST
-f event_type=app-docs
-F 'client_payload[schema_version]=1'
-f 'client_payload[source_repository]=OffbandMesh/meshcore-client'
-f 'client_payload[source_ref]=refs/heads/dev'
-f "client_payload[source_sha]=$SOURCE_SHA"
Loading…
Cancel
Save

Powered by TurnKey Linux.