Skip to content

UAE PASS docs watch #15

UAE PASS docs watch

UAE PASS docs watch #15

Workflow file for this run

name: UAE PASS docs watch
# Runs in the cloud (GitHub Actions) — no developer machine involved.
# Every 3 days it mirrors the live docs at docs.uaepass.ae, detects drift vs the
# committed docs-sync.json baseline, and:
# • if the docs changed → Codex (GPT-5.6 Luna) updates the references and opens a PR;
# • if the baseline is stale (>3 months since last sync) → opens/refreshes a
# reminder issue so a human verifies the skill still matches the docs.
#
# Setup: add a repo secret OPENAI_API_KEY (see MAINTAINING.md). Trigger a first
# run manually via the "Run workflow" button.
on:
schedule:
- cron: "0 6 */3 * *" # every 3 days at 06:00 UTC
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
issues: write
concurrency:
group: docs-watch
cancel-in-progress: false
jobs:
watch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Mirror the latest UAE PASS docs
run: bash scripts/update-from-docs.sh docs-mirror
- name: Detect drift + staleness
id: drift
run: node scripts/check-docs-drift.mjs --mirror docs-mirror --github-output
- name: Reminder issue when the reference is stale (>3 months)
if: steps.drift.outputs.stale == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
title="⏰ UAE PASS docs reference may be stale (>3 months)"
body="It has been ${{ steps.drift.outputs.daysSinceSynced }} days since the references were last synced to docs.uaepass.ae.
Please verify the skill still matches the live docs: run \`scripts/update-from-docs.sh\` and review \`skills/uaepass/references/\` (see MAINTAINING.md), then re-seed with \`node scripts/check-docs-drift.mjs --mirror docs-mirror --write\`.
Latest check summary: ${{ steps.drift.outputs.summary }}"
existing=$(gh issue list --state open --search "$title in:title" --json number --jq '.[0].number // empty')
if [ -n "$existing" ]; then
gh issue comment "$existing" --body "$body"
else
gh issue create --title "$title" --body "$body" --label "docs-stale" || \
gh issue create --title "$title" --body "$body"
fi
- name: Update references via Codex (GPT-5.6 Luna) and open a PR (on drift)
if: steps.drift.outputs.changed == 'true'
uses: openai/codex-action@v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
model: gpt-5.6-luna
effort: high
safety-strategy: drop-sudo
prompt: |
The upstream UAE PASS documentation at https://docs.uaepass.ae has changed.
A fresh Markdown mirror of every page is in ./docs-mirror (gitignored).
Detected change: ${{ steps.drift.outputs.summary }}.
Task:
1. Read MAINTAINING.md (the reference→source map and the editing rules).
2. Diff the relevant docs-mirror pages against skills/uaepass/references/ and
faithfully update ONLY what actually changed. Keep the `idshub` endpoints
authoritative; flag any legacy `trustedx-*` values as deprecated; keep one
platform per file; keep SKILL.md lean.
3. Run: node scripts/check-docs-drift.mjs --mirror docs-mirror --write
to refresh docs-sync.json.
4. Open a pull request on a new branch titled
"chore(docs): sync UAE PASS references with upstream", with a body listing
exactly which references changed and why. Do NOT commit the docs-mirror/
folder. Do NOT add any Co-Authored-By trailer.
env:
GH_TOKEN: ${{ github.token }}