~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
40 lines · 1.9 KB Raw History
# The documentation site (docs-site/): the guides under docs/, the
# specification's pages, and the methods and variables made from the
# 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.
#
# 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.
on:
  push:
    refs: [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]
  pull:
    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