name: Sync Flasher Docs & Changelog # Pushes the observer docs and the regenerated changelog to the flasher site # WITHOUT rebuilding firmware. Companion to build-observer-firmwares.yml: # - code changes -> build-observer-firmwares.yml (builds + syncs everything) # - doc / markdown edits -> this workflow (fast sync only, no firmware rebuild) # Keep the synced file list and trigger paths in step with the build workflow's # "Sync Docs into Flasher" step and with LOCAL_DOCS in flasher/docs.html. permissions: contents: read on: workflow_dispatch: push: branches: - observer-firmware paths: - '**.md' - 'docs/**' - 'scripts/gen_changelog.py' # /webconfig frames the real portal page against a browser simulator, so # the page itself is a synced doc asset like the .md files above. - 'webui/index.html' # Own group: serialize doc syncs against each other only. Deliberately NOT shared # with build-observer-firmwares.yml -- a shared group let one workflow cancel the # other's pending run (a mixed code+docs commit triggers both). Concurrent flasher # pushes are handled by the rebase-retry in "Commit & Push Flasher Content". concurrency: group: flasher-docs-sync cancel-in-progress: false jobs: sync: runs-on: ubuntu-latest steps: - name: Clone Repo uses: actions/checkout@v4 with: # full history so scripts/gen_changelog.py can read the branch commit log fetch-depth: 0 - name: Checkout Flasher Repo uses: actions/checkout@v4 with: repository: agessaman/flasher.meshcore.io token: ${{ secrets.FLASHER_DISPATCH_TOKEN }} path: flasher - name: Sync Docs into Flasher run: | # docs.html on the flasher site serves these raw .md files and renders # them client-side; keep this list in sync with LOCAL_DOCS in # flasher/docs.html and the build workflow's sync step. for f in MQTT_IMPLEMENTATION.md MQTT_SNMP.md ALERTS.md; do if [ -f "$f" ]; then cp -f "$f" "flasher/$f" echo "synced $f" else echo "WARNING: source doc $f not found" >&2 fi done - name: Sync the WebConfig Portal Page into Flasher run: | # flasher/webconfig.html embeds the REAL portal page in a device # surround and runs it against lib/webconfig-sim.js, which intercepts # fetch() so no device is needed. Syncing the page is what keeps that # demo honest -- the alternative is screenshots, which go stale without # anyone noticing. The build script only injects a