krz/hutch

an ios client for sourcehut

clone: git clone https://gitbay.org/krz/hutch.git

v3.10.0: .github/workflows/sync-man-pages.yml · raw

 1name: Sync man pages
 2
 3# Keeps Hutch/Resources/man-pages.json — the official man-page list the More tab
 4# renders — in step with man.sr.ht, so the catalog is never hand-maintained.
 5#
 6# scripts/sync_man_pages.py re-derives the list from the man.sr.ht landing page.
 7# If the result differs from the committed copy, this opens (or updates) a pull
 8# request with the change. The script refuses to write a suspiciously short list,
 9# so an upstream markup change can't silently gut the catalog.
10#
11# Note: PRs opened with the default GITHUB_TOKEN do not themselves trigger other
12# workflows (GitHub blocks that to avoid recursion), so the Tests workflow won't
13# run on the auto-PR. That's fine here — the change is a bundled JSON resource —
14# and a maintainer can push an empty commit to run CI if they ever want it.
15on:
16  schedule:
17    # Weekly, Mondays 06:00 UTC. Upstream churns rarely; this is frequent enough.
18    - cron: "0 6 * * 1"
19  workflow_dispatch:
20
21permissions:
22  contents: write
23  pull-requests: write
24
25concurrency:
26  group: sync-man-pages
27  cancel-in-progress: true
28
29jobs:
30  sync:
31    runs-on: ubuntu-latest
32    steps:
33      - uses: actions/checkout@v7
34
35      - uses: actions/setup-python@v5
36        with:
37          python-version: "3.12"
38
39      - name: Regenerate man page catalog
40        run: python3 scripts/sync_man_pages.py
41
42      - name: Open pull request on change
43        uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
44        with:
45          add-paths: Hutch/Resources/man-pages.json
46          branch: automated/man-page-catalog
47          delete-branch: true
48          commit-message: "Sync bundled man page catalog with man.sr.ht"
49          title: "Sync bundled man page catalog"
50          body: |
51            Automated update: the official man-page list on man.sr.ht changed.
52
53            Regenerated by `scripts/sync_man_pages.py`. Review the diff to
54            `Hutch/Resources/man-pages.json` before merging.
55          labels: documentation