Commit 213ccea
docs: add public pages for the deepnote publish and sync CLI commands (#510)
* fix(cli): let sync and publish share one baseline for project files
`deepnote publish` deploys into `_deepnote_static/**`, which is a subtree of
the project file store `deepnote sync --all-files` mirrors. Neither command
knew about the other, so they drifted: every publish made the whole static
subtree look changed to sync (re-downloading it on the next run), a stale
local mirror could be pushed back over a live site with no staleness check,
and `publish --prune` left local ghosts that a later edit would resurrect.
Resolved by coordination rather than by dividing the namespace, so both
commands keep working on the same paths:
- Sync gains per-file lost-update protection on push. `uploadProjectFiles`
never fetched the inventory at all; it now checks every candidate against
it and routes a file that moved since the manifest baseline through the
existing `--on-conflict` override-or-skip choice. A pending replacement is
exempt — that missing cloud copy is sync's own unfinished delete. This also
fixes the same silent overwrite for ordinary working files edited in the
Deepnote app.
- Publish updates the sync mirror when the published directory sits inside a
synced workspace: it writes each file into the project's `.files/` mirror
and records size, hash, and server `updatedAt`, exactly as a sync download
would. `--prune` drops pruned paths from both. `--sync-root`/`--no-sync-root`
control discovery.
- Publish stops before mutating anything if a path it would write has moved on
in Deepnote since that workspace last synced, since the mirror holds no copy
of that content; `--force` overrides. Its check is deliberately narrower
than sync's: publish is a deploy where the local build is authoritative, so
a path with no baseline is not flagged.
- `PROJECT_STATIC_ROOT` moves to `@deepnote/cloud` so every writer agrees on
where the boundary is.
The mirror is only updated when the tracked project directory already exists —
creating it would make the next sync read the project as "all notebooks deleted
locally" and push that. Mirror failures are warnings, not errors: the deploy
succeeded, and a stale manifest is safe because the next sync asks.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: add public pages for the deepnote publish and sync CLI commands
Neither command had public documentation, and "deepnote sync" was easy to
confuse with the in-product "Deepnote file sync" feature since the names
collide and nothing distinguished them.
- docs/deepnote-cli-publish.md — deploying a build directory to a project:
authentication and token safety, finding a project ID, the _deepnote_static
target and --path, --api-access and why it is off by default, --prune,
failure ordering, exit codes, and the canonical URL the server returns.
- docs/deepnote-cli-sync.md — mirroring a workspace locally: the directory
layout and manifest, both sync directions, conflict handling, --all-files,
the deletion rules, safety rails, and automation.
- docs/deepnote-file-sync.md — a callout up top distinguishing the in-product
Git-linked feature from the CLI command, plus cross-links.
Both new pages document ownership of the static site directory: publish is
the write path, and sync mirrors it without ever silently overwriting it,
surfacing a republished site as a conflict instead. A publish inside a synced
workspace keeps that workspace's mirror in step.
Deliberately untouched: docs/deepnote-mcp.md (waiting on the released
manifest), and docs/creating-apps.md, docs/streamlit.md, docs/scheduling.md,
docs/export-pdf.md and docs/export-project.md (PR #491 and the app-reference
work). No tool counts or unreleased capabilities are described.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: correct the access model for published static sites
The publish page described a published site as a "public static website" and
its contents as "publicly readable". That was wrong. Static file sharing has
no anonymous tier and no link-only tier: an unauthenticated visitor is
redirected to sign-in, and the viewer must additionally be an active user with
view access to the project. A workspace-level setting and plan availability
can each disable it independently, and access is re-checked on every request.
Adds a "Who can view a published site" section stating those requirements, and
points readers at data apps — which do offer "Anyone with a link" and "Public"
access levels — when the deliverable has to reach people without Deepnote
accounts. That contrast is the thing most likely to be assumed wrongly, since
"publish" implies public hosting elsewhere.
Also notes that API access can only narrow the audience rather than widen it,
and that the printed URL must be used verbatim because each project's site is
served from its own origin.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs(publish): narrow the DEEPNOTE_TOKEN exposure claim
Say the environment variable keeps the token out of the command line rather than claiming it avoids shell-history and process-list exposure entirely.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: tomas <tomas@kislan.sk>1 parent 8cd8832 commit 213ccea
3 files changed
Lines changed: 507 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
0 commit comments