wiki.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Publishes docs/wiki/ to this repository's GitHub wiki. A caller of
  2. # git-your-ship-together's wiki-publish.yml, which every repository that
  3. # mirrors its docs into a wiki calls the same way.
  4. #
  5. # On a pull request that touches the pages it only generates them, so a
  6. # broken page or link rewrite fails the review; on main it also publishes.
  7. # The generate job runs scripts/gen-wiki.sh with contents: read; the publish
  8. # job holds contents: write, runs none of this repository's code, and replaces
  9. # every page in the wiki with the generated set. A page that exists only in
  10. # the wiki editor is removed: docs/wiki/ is the one place pages are written.
  11. #
  12. # GitHub creates a wiki's git repository only when its first page is saved in
  13. # the UI. If the publish job says so, open the Wiki tab, save any page once,
  14. # and re-run.
  15. name: Wiki
  16. on:
  17. push:
  18. branches: [main]
  19. paths:
  20. - "docs/wiki/**"
  21. - "scripts/gen-wiki.sh"
  22. - "scripts/gen_wiki_nav.py"
  23. - ".github/workflows/wiki.yml"
  24. pull_request:
  25. paths:
  26. - "docs/wiki/**"
  27. - "scripts/gen-wiki.sh"
  28. - "scripts/gen_wiki_nav.py"
  29. - ".github/workflows/wiki.yml"
  30. workflow_dispatch:
  31. permissions: {}
  32. jobs:
  33. wiki:
  34. uses: ChiefGyk3D/git-your-ship-together/.github/workflows/wiki-publish.yml@5c1a813d8ad21adf845d221c59d17ce9406d5e53 # v1.41.0
  35. permissions:
  36. contents: write # the publish job only, on main; the generate job holds contents: read
  37. with:
  38. install-command: pip install pyyaml==6.0.2 # gen-wiki.sh renders the page navigation from docs/wiki/_nav/
  39. generate-command: bash scripts/gen-wiki.sh "$OUT_DIR"
  40. out-dir: wiki-out