@nimtech/nimpress 2.10.1 → 2.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,4 +44,14 @@ A release that changes a user visible surface carries its changelog entry in `do
44
44
 
45
45
  ## When the user says "deploy"
46
46
 
47
- The `deploy` skill in `.claude/skills/deploy.md` lays out the exact commands. Execute it end to end, stopping only if a step fails. Surface errors verbatim, do not paper over them.
47
+ Run these in order from the repo root. Stop on the first failure and surface the error verbatim; a failing build or type check blocks the release and nothing is committed.
48
+
49
+ 1. The publish workflow needs the GitHub Actions secret `NPM_TOKEN` on this repo, an npm automation token that can publish under the `@nimtech` scope; it is consumed as `NODE_AUTH_TOKEN` for the registry step. Nothing else: `pnpm install` resolves every dependency from the public registry.
50
+
51
+ 2. `just build`, `pnpm run build:lib` under the hood. Emits `dist/nimpress.es.js`, `dist/plugin.es.js`, `dist/tailwind.preset.js`, `dist/style.css` and `dist/*.d.ts`.
52
+
53
+ 3. `just check`, `svelte-check` plus `tsc -p tsconfig.node.json`.
54
+
55
+ 4. Stage every changed file relevant to the release, commit with a single sentence describing the user visible change, and `git push`. With nothing to commit, still push so the bump pushes a clean ref. The message rules are `~/.claude/rules/git.md`.
56
+
57
+ 5. `just deploy`, which runs `sbump patch --json package.json@.version --push-version --auto --workflow`: patch bump, tag write, tag push, and the three workflows the tag starts. `just deploy-minor` or `just deploy-major` for a larger bump.
@@ -50,6 +50,20 @@ The receiver is thin. The `docs-sync` action owns the mirror, the version bump,
50
50
 
51
51
  3. Never commit a private key. Keep `*.pem` in `.gitignore`.
52
52
 
53
+ ## Wiring a repo onto the pipeline
54
+
55
+ When the user asks to connect a repo to the docs site, or to set up docs sync, ask which repo is the docs site before writing anything, then run these in order and stop on the first failure.
56
+
57
+ 1. Create `<export-dir>/index.md` at the repo root if it does not exist, `.nimpress` unless the user names another folder, with `title` and `description` frontmatter and a short overview. More pages and a `changelog` folder follow the authoring rules.
58
+
59
+ 2. Write `.github/workflows/docs.yml`: trigger `on: push: tags: ['v*']` plus `workflow_dispatch`; `env: EXPORT_DIR: .nimpress`; one job that checks out with `fetch-depth: 0`, a `changed` step that is `true` on a dispatch and otherwise runs `git diff --name-only <previous version tag> <this tag> -- "$EXPORT_DIR"` against the newest `v[0-9]*.[0-9]*.[0-9]*` tag that is not this one, then, only when changed, `actions/create-github-app-token@v1` with `app-id: ${{ secrets.APP_ID }}`, `private-key: ${{ secrets.APP_PRIVATE_KEY }}`, `owner: nimling` and `repositories: <docs site repo name>`, and `nimling/nimpress/actions/docs-notify@v2` with `docs-repo: nimling/<docs site repo name>`, `token: ${{ steps.app.outputs.token }}` and `export-dir: ${{ env.EXPORT_DIR }}`.
60
+
61
+ 3. Ensure `.gitignore` contains `*.pem`.
62
+
63
+ 4. Print the manual steps for the org owner or an admin and do not attempt them: install the shared docs App on the repo; set `APP_ID` and `APP_PRIVATE_KEY` with `gh secret set APP_ID -R <owner>/<repo> -b "<id>"` and `gh secret set APP_PRIVATE_KEY -R <owner>/<repo> < github.pem`; add the source to `nimpress.sources.json` at the docs repo root, or pass the same object as the receiver's `defaults` input, in the shape of the Configuration section above with `target`, `mode`, `publish`, `branch`, `commit`, `pullRequest` and `version`.
64
+
65
+ 5. Trigger with `gh workflow run docs.yml -R <owner>/<repo>` or a version tag, watch the notify run, then the `docs-sync` run on the docs repo, then confirm the `docs-sync/<owner>/<repo>` pull request. The pull request step on the receiver must use the App token, since an org setting can block the default token from creating pull requests, and the docs version tracks the app version, so publishing happens on a tag, not on every commit.
66
+
53
67
  ## What is wrong if you see it
54
68
 
55
69
  1. A consumer workflow triggered on a branch push rather than a version tag.