chadtmiller.com/group-host
atmosphere group host
0
0
The docs site is public, deployed on each push to main
.knotless/workflows/docs.yml+16−4
| @@ -1,9 +1,10 @@ | ||
# The docs, as `just docs` checks them: every relative link and anchor | ||
# lands (harness/docs.mjs); and the site docs-site/ makes of them builds. | ||
# `just docs-deploy` deploys it, from the owner's machine: the site of a | ||
# private repository is kept in its space, which an app password, all a | ||
# run could sign in with, cannot write. The site's packages are kept | ||
# between runs and installed again only when its lockfile changes. | ||
# On a push to main, the site is deployed as the repository's, at | ||
# https://chadtmiller-com.knotless.page/group-host/, as the owner, with | ||
# RELEASE_PASSWORD, the app password of theirs release.yml takes, sealed | ||
# to this runner for main alone. The site's packages are kept between | ||
# runs and installed again only when its lockfile changes. | ||
image: node:24.22.1 | ||
# The shared runner host, as every workflow here. | ||
runners: [runner.knotless.dev] | ||
| @@ -16,6 +17,10 @@ on: | ||
base: [refs/heads/main, refs/heads/feature/*] | ||
paths: [docs/**, README.md, AGENTS.md, harness/docs.mjs, harness/shots.mjs, docs-site/**, lexicons/**, web/src/tokens.css, .knotless/workflows/docs.yml, .knotless/uses.lock] | ||
cache: [docs-site/node_modules] | ||
secrets: [RELEASE_PASSWORD] | ||
env: | ||
REPO: knotless://chadtmiller.com/group-host | ||
KNOTLESS_APPVIEW: https://knotless.dev | ||
steps: | ||
- uses: chadtmiller.com/steps/npm-ci@1 | ||
name: packages | ||
| @@ -24,3 +29,10 @@ steps: | ||
run: node harness/docs.mjs | ||
- name: site | ||
run: cd docs-site && npm run build | ||
- name: deploy | ||
on: {refs: [refs/heads/main]} | ||
run: | | ||
curl -fsSL "$KNOTLESS_APPVIEW/install.sh" | KNOTLESS_INSTALL_DIR=/usr/local/bin sh | ||
owner=${REPO#knotless://} | ||
export KNOTLESS_IDENTIFIER=${owner%%/*} KNOTLESS_PASSWORD="$RELEASE_PASSWORD" | ||
knotless repo site "$REPO" docs-site/dist --not-found 404.html | ||
docs/reference/cli.md+1−1
| @@ -176,6 +176,6 @@ An unknown command or flag fails with its usage, and any failure exits 1. | ||
| `e2e <args>` | builds the console and the host, then runs the console's flows in Chromium over the reference PDS, as the `e2e` check does | | ||
| `atgrp <args>` | runs the command | | ||
| `docs` | checks the docs' links and anchors, as the `docs` check runs it | | ||
| `docs-site` | serves the docs as their site at http://localhost:4321/, updating as they change | | ||
| `docs-site` | serves the docs as their site at http://localhost:4321/group-host/, updating as they change | | ||
| `docs-deploy` | builds the docs site and deploys it as the repository's ([development](../development.md#the-docs-site)) | | ||
| `release [--dry-run]` | tags the release that last landed, then cuts the next from main's change files as the `Release <version>` pull ([development](../development.md#releasing)) | | ||
docs/development.md+7−7
| @@ -199,15 +199,15 @@ any page links to its entry there. It matches by its whole NSID, or by | ||
its name alone where no other listed method has that name. The site | ||
looks like the console, from `web/src/tokens.css`. | ||
| ||
`just docs-site` serves it as it changes, at http://localhost:4321/. A | ||
`just docs-site` serves it as it changes, at http://localhost:4321/group-host/. A | ||
new page goes in the sidebar in `docs-site/astro.config.mjs`. | ||
| ||
The repository is private, so its site is too. knotless serves it to | ||
its members alone, at a host of its own, which `just docs-deploy` | ||
prints. It's kept in the repository's space, which only its owner can | ||
write, signed in with `knotless login`. An app password can't write to | ||
a space, so no workflow can deploy it. The owner runs `just | ||
docs-deploy` after a change to the docs lands. | ||
knotless serves it as the repository's site, at | ||
https://chadtmiller-com.knotless.page/group-host/, so it's built with | ||
`/group-host/` as its base. The `docs` check deploys it on each push to | ||
`main`, as the owner, with the app password `RELEASE_PASSWORD` that | ||
`release` takes too. `just docs-deploy` deploys a build from here, as | ||
the owner signed in with `knotless login`. | ||
| ||
## The checks | ||
| ||
docs-site/astro.config.mjs+2−2
| @@ -4,8 +4,8 @@ import { defineConfig } from 'astro/config'; | ||
import { REPO, remarkLinks, remarkShots } from './plugins.mjs'; | ||
import { remarkReference } from './reference.mjs'; | ||
| ||
/** Where the site is served: a private repository's site is at its own host's root. */ | ||
const base = '/'; | ||
/** Where the site is served: a public repository's is under its name, on its owner's knotless.page host. */ | ||
const base = '/group-host/'; | ||
| ||
// The sidebar follows docs/README.md: guides, design, then reference, then deploying and development. | ||
const page = (label, slug) => ({ label, slug }); | ||
AGENTS.md+3−2
| @@ -75,7 +75,8 @@ right, and come before the code they test. | ||
the lexicons by @atproto/lex (`npm run lex`, which `dev`, `build` and | ||
`check` run first) into `web/src/lib/lexicons`, not kept in git. | ||
- `docs-site/`: the docs as a site, made from `docs/` as it is, and | ||
deployed with `just docs-deploy` (`docs/development.md`). | ||
deployed by the `docs` check on each push to `main` | ||
(`docs/development.md`). | ||
- `harness/`: the checks beside the tests, and the console's flows end to | ||
end (`harness/e2e`). | ||
| ||
| @@ -217,7 +218,7 @@ pulls into it or into a `feature/` branch: | ||
then `just shots --check`: each guide's pictures drawn again, failing | ||
when what one shows has changed. | ||
- `docs`: `just docs`, every link and anchor landing, and the docs site's | ||
build. | ||
build; on a push to `main`, the site deployed. | ||
| ||
Two more check nothing. `mirror`: each push to `main` or a tag pushes | ||
the same commit to a copy on GitHub | ||
Justfile+5−5
| @@ -39,16 +39,16 @@ lex: | ||
docs: | ||
node harness/docs.mjs | ||
| ||
# The docs as their site, at http://localhost:4321/, redrawn as they change. | ||
# The docs as their site, at http://localhost:4321/group-host/, redrawn as they change. | ||
docs-site: | ||
cd docs-site && npm ci --no-audit --no-fund && npm run dev | ||
| ||
# An app password cannot write the space a private repository's site is | ||
# kept in, so this runs as its owner, signed in with `knotless login`. | ||
# The docs site, built and deployed as the repository's, for its members. | ||
# The docs site, built and deployed as the repository's, at | ||
# https://chadtmiller-com.knotless.page/group-host/, as its owner, signed | ||
# in with `knotless login`. The docs check deploys it on each push to main. | ||
docs-deploy: | ||
cd docs-site && npm ci --no-audit --no-fund && npm run build | ||
knotless site knotless://chadtmiller.com/group-host docs-site/dist --not-found 404.html | ||
knotless repo site knotless://chadtmiller.com/group-host docs-site/dist --not-found 404.html | ||
| ||
# Tags the release that last landed, then cuts the next from main's | ||
# change files as the `Release <version>` pull (deploy/release.sh), as | ||