Content-addressed version deploy system for Diffuse elements.diffuse.sh
1.1 kB · 28 lines
Markdown
at main

Content-addressed version deploy system for Diffuse. Allows the user to pick a deployed version of Diffuse.

How to use #

  1. Install deno and fclones
  2. deno run build
  3. Optionally run a deploy command

Deploying #

deno task deploy:ipfs
deno task deploy:statichost diffuse

The statichost deploy builds and zips the site with the zip task, then uploads diffuse.zip via the direct upload API. It needs a STATICHOST_APIKEY (create one at https://builder.statichost.eu/account) and your site name (as an argument or STATICHOST_SITE).

Diffuse records the version slug it is running as in localStorage (diffuse/last-version-used). The generated root index.html reads it and redirects there when that version is still deployed, falling back to /latest/ otherwise. This is what makes / return to the version you used last.

To do #