~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/steps

Shared steps for knotless workflows: Node, npm, Rust lint, coverage tools, SSH keys and waiting for checks

0
0

A step deploys a repository's site

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/steps:site

What changes

A new step, site, deploys a directory as the repository's site on knotless.page with knotless site, as the repository's owner. It takes dir, and optionally repo (this run's repository by default), fallback, not-found and appview. The owner's app password comes as the secret SITE_PASSWORD. When the image has no knotless, the step installs it from the appview's /install.sh. The README lists it and shows a workflow using it.

Why

The pages design page says a shared step makes deploying a site one line. This is that step.

Checked

Run against a stub knotless: it fails, naming the secret, without SITE_PASSWORD, and passes the owner, the password and the flags as given. With no knotless, it installed the binaries from knotless.dev. The released client, 0.8.0, has no site command yet, so the step works from the next release.

🤖 Generated with Claude Code

Approved

This adds a site step that deploys a directory with knotless site. I found nothing that has to change before it merges.

  • Conventions: the step follows the existing ones. INPUT_* names map the same way ssh-key does (known-hosts becomes INPUT_KNOWN_HOSTS). KNOTLESS_RUN_REPO is used as wait-for-checks uses it.
  • Failure handling: the step fails early and names the secret when SITE_PASSWORD is missing. It passes the password through the environment, not as an argument.
  • Install pipe: curl … | sh under set -eu hides a curl failure, because the pipe's status is sh's. If the download fails, the step stops later with a "knotless: not found" error instead of at the download. That is harmless, but you could add set -o pipefail if the shell supports it.
  • Release: the PR body says the step works only once a release ships knotless site. Keep that in mind before tagging a release of this step.
  • Not run: I read the diff only and did not run the step.
Merged as c09ecee