1 Safe artifact Validated
Draft uploads reject scripts, forms, frames, unsafe URL schemes, and other constructs that do not belong in a static review document.
PatchPage turns one validated static HTML file into a public review link. Publishing is authenticated by default; viewing is public and unlisted.
Requires Node.js 22 or newer.
Provide PATCHPAGE_SETUP_TOKEN through a secret environment. This scoped workflow pins this endpoint, clears inherited credential overrides, and verifies the stored token before validation or upload.
(
set +x
set -eu
PATCHPAGE_API_URL='https://post.patchyhq.com'
export PATCHPAGE_API_URL
unset PATCHPAGE_API_TOKEN
unset TOKEN
: "${PATCHPAGE_SETUP_TOKEN:?Set PATCHPAGE_SETUP_TOKEN to a PatchPage API token}"
ARTIFACT_PATH='./plan.html'
printf '%s' "$PATCHPAGE_SETUP_TOKEN" | npx --yes patchpage auth set --token-stdin --api-url "$PATCHPAGE_API_URL"
unset PATCHPAGE_SETUP_TOKEN
npx --yes patchpage whoami &&
npx --yes patchpage validate "$ARTIFACT_PATH" &&
npx --yes patchpage upload "$ARTIFACT_PATH"
)
Draft uploads reject scripts, forms, frames, unsafe URL schemes, and other constructs that do not belong in a static review document.
Anyone with the draft URL can view it. Use PatchPage for material that is acceptable as an unlisted public link.
Upload controls govern publishing; they do not make draft viewers private.
Health check: /healthz. Inspired by Postplan, the static HTML draft publishing pattern created by Theo.