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

docs-site: the docs workflow deploys the site on each push to main

Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:docs/deploy-from-workflow
.knotless/workflows/docs.yml+19−1
@@ -3,7 +3,13 @@
# lexicons and the spec's tables. Its build fails on a link to a file or
# heading that is not there, a method spec/PDS.md lists under no page, or
# a variable the spec names in no table of them, so a pull that breaks one
# is caught. `just docs-deploy` deploys it, from the owner's machine.
# is caught.
#
# A push to main that changes it deploys it too, as the repository's site,
# https://chadtmiller-com.knotless.page/monolith/: its `dev.knotless.site`
# record in the owner's account, written with RELEASE_PASSWORD, the owner's
# app password that release.yml publishes with, sealed to this runner for
# pushes to main alone. `just docs-deploy` deploys it by hand.
image: node:24.22.1
runners: [runner.knotless.dev]
# The two lists are the same; keep them so.
@@ -15,8 +21,20 @@ on:
base: [refs/heads/main]
paths: [docs/**, spec/*.md, spec/lexicons/**, compat/*.md, bench/*.md, bench/results.json, docs-site/**, .knotless/workflows/docs.yml, .knotless/uses.lock]
cache: [docs-site/node_modules]
secrets: [RELEASE_PASSWORD]
env:
REPO: knotless://chadtmiller.com/monolith
steps:
- uses: chadtmiller.com/steps/npm-ci@1
with: {dir: docs-site}
- name: build
run: cd docs-site && npm run build
# The site's commit is the run's (KNOTLESS_RUN_SHA), which `repo site`
# takes unless given another.
- name: deploy
on: {refs: [refs/heads/main]}
run: |
curl -fsSL https://knotless.dev/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/guide/contributing.md+4−2
@@ -212,8 +212,10 @@ of them; the `docs` workflow builds it on each pull that changes what it is
made from. `just docs-site` serves it at http://localhost:4321/ while you
write.
The site is at https://chadtmiller-com.knotless.page/monolith/. Its owner
deploys it:
The site is at https://chadtmiller-com.knotless.page/monolith/. The `docs`
workflow deploys it on each push to `main` that changes what it is made
from, signed in with the owner's app password, `RELEASE_PASSWORD`. Its
owner can deploy it by hand too, signed in with `knotless login`:
```sh
just docs-deploy
AGENTS.md+2−2
@@ -93,8 +93,8 @@ sessions in it, in `docs/`, or in the spec.
build`, which fails on a link to a file or heading that is not there, a
method `spec/PDS.md` lists under no page, or a variable the spec names in
no table of them; `just docs-site` serves it while writing. The `docs`
workflow builds it on each pull; its owner deploys it with `just
docs-deploy`.
workflow builds it on each pull, and deploys it on each push to `main`
that changes it; `just docs-deploy` deploys it by hand.
- The spaces run (`harness/spaces/compare.mjs`, `spec/SPACES.md`) checks the
server against the pinned spaces alpha of the reference, with its own
packages: `cd harness/spaces && npm ci` once; `pin-alpha.sh` re-pins it.
Justfile+1−1
@@ -40,7 +40,7 @@ dev *args: build
docs-site:
cd docs-site && npm ci --no-audit --no-fund && npm run dev
# The documentation site, built and deployed as the repository's, at https://chadtmiller-com.knotless.page/monolith/: run by its owner, signed in with `knotless login`.
# The documentation site, built and deployed as the repository's, at https://chadtmiller-com.knotless.page/monolith/, by hand: the `docs` workflow deploys it on each push to main that changes it. Run by its owner, signed in with `knotless login`.
docs-deploy:
cd docs-site && npm ci --no-audit --no-fund && npm run build
knotless repo site knotless://chadtmiller.com/monolith docs-site/dist --not-found 404.html