Files
NeoandClaude 05e8885037 Add the site, with an API reference made from the doc comments (#3)
tools/apiref (its own module, so go.mod stays at Go 1.18) writes
docs/api.md with go/doc, as go doc and pkg.go.dev read the package.
The Pages workflow builds docs/ and the README with brand's shared
theme, and fails if docs/api.md is out of date.


Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-05 17:52:09 -08:00

26 lines
820 B
YAML

# go3270's site, https://d-modem.github.io/go3270/: docs/ and the README
# with brand's shared theme and workflow (brand's docs/sites.md). A pull
# request builds it, main deploys it. It fails if docs/api.md isn't what
# the doc comments make now (tools/apiref).
name: Pages
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
site:
uses: D-Modem/brand/.github/workflows/site.yml@main
with:
go-version: "1.24"
prepare: |
(cd tools/apiref && go run . ../.. ../../docs/api.md)
git diff --exit-code docs/api.md || { echo "::error::docs/api.md is out of date: cd tools/apiref && go run . ../.. ../../docs/api.md"; exit 1; }