Skip to content

docs(actions): GitHub Actions setup and usage guide, generated tables, docs-sync rule - #75

Merged
ilanh merged 1 commit into
mainfrom
docs/github-actions-guide
Nov 9, 2026
Merged

ilanh merged 1 commit into
mainfrom
docs/github-actions-guide

Conversation

@ilanh

@ilanh ilanh commented Nov 9, 2026

Copy link
Copy Markdown
Owner

What and why

Turns docs/GITHUB_ACTIONS.md (extended in place, no new file) into a setup and usage guide for the shared actions, and adds guardrails so docs stay in sync with code.

Closes #74

Guide (docs/GITHUB_ACTIONS.md): prerequisites, copy-paste quick start, choosing a ref/version (release tag vs @main + version: source vs latest, which resolves only stable releases and none exist yet), pinning and permissions, per-action reference, recipes (PR gate with strict drift/providers/profiles-dir, monorepo root/paths, generate + artifact, image build with the generated policy, diff-logs with deny-stale), the real example in ilanh/openspell-python-tester, troubleshooting, and how to change an action.

Docs sync

  • scripts/gen-actions-docs.sh generates every action's inputs/outputs table from actions/*/action.yml between <!-- BEGIN/END actions-docs <name> --> markers. --check fails on stale tables, on an action with no section, or on a section for an action that no longer exists. It runs in ci.yml (check job) and scripts/ci-local.sh.
  • AGENTS.md: "Docs must be updated in the same PR" with a code-area → doc table; CONTRIBUTING.md and docs/DEVELOPING.md point to it.
  • PR template: docs-updated and CHANGELOG checklist items.

Stale docs fixed

  • README and the old quick start recommended actions/check@v0.1.0-rc.3, which still has the actions/check is broken for external consumers (uses ./actions/... paths) #65 bug for consumers. They now use setup + drift + lint at that tag and say check needs main or a later release.
  • Version comments on pinned SHAs were wrong: actions/checkout@3d3c42e… is v7.0.1 (not v4.2.2), actions/cache@0057852… is v4.3.0, actions/upload-artifact@cf430e0… is v7.0.2 (checked against the tags). Comments only; SHAs unchanged.
  • setup/check version descriptions still said source builds the checked-out repository (changed in fix(actions): make check work for external consumers #66).
  • install-dir and cache descriptions now state the real default and cache key.

Checklist

  • Branch is named docs/ and commits are signed off (git commit -s)
  • scripts/gen-docs.sh --check and scripts/gen-actions-docs.sh --check pass; shellcheck and actionlint clean
  • Tests: --check verified to fail on a renamed input and on an action without a section
  • Docs updated in this PR
  • CHANGELOG.md has a line under ## [Unreleased]
  • No secrets in code, fixtures or output

…, docs-in-same-PR rule

Extend docs/GITHUB_ACTIONS.md into a setup and usage guide (prerequisites, quick start,
choosing a ref/version, per-action reference, recipes, pinning, troubleshooting, real example).
Inputs/outputs tables are generated from actions/*/action.yml by scripts/gen-actions-docs.sh;
CI and ci-local.sh run it with --check.

Add a docs-in-the-same-PR rule with a code-area-to-doc map to AGENTS.md and CONTRIBUTING.md,
and PR template checklist items.

Fix stale docs: check@v0.1.0-rc.3 is broken for consumers (#65), so quick starts use
setup+drift+lint at that tag; correct version comments on pinned SHAs (checkout v7.0.1,
cache v4.3.0, upload-artifact v7.0.2); setup's version description after #66; document
that latest resolves only stable releases.

Closes #74

Signed-off-by: Ilan Harel <ilan@Ilans-MacBook-Pro.local>
@ilanh
ilanh force-pushed the docs/github-actions-guide branch from d45f6af to d09a0cf Compare November 9, 2026 11:33
@ilanh
ilanh merged commit 36d322e into main Nov 9, 2026
8 checks passed
@ilanh
ilanh deleted the docs/github-actions-guide branch November 9, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: GitHub Actions setup and usage guide, and keep docs in sync with code

1 participant