From 6cddd64a143ae8bbbc0f5a475190ddebdb39bbc9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 14 Aug 2017 20:08:38 +0200 Subject: [PATCH] document IPFS snapshots script --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index dac04fe..4c183ec 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ * [Prerequisite: authentication](#prerequisite-authentication) * [Staging build & beta deployment](#staging-build--beta-deployment) * [Production build & live deployment](#production-build--live-deployment) +* [IPFS snapshots](#ipfs-snapshots) * [Coding conventions](#coding-conventions) * [(S)CSS](#scss) * [JavaScript](#javascript) @@ -135,6 +136,25 @@ gulp build --production gulp deploy --live ``` +## IPFS snapshots + +While the site isn't hosted on IPFS, we upload selected snapshots to it and keep a history of those hashes in the `versions` folder. By prepending every hash with e.g. `https://ipfs.io/ipfs/` you can see all those versions. + +To add a snapshot of the full site to IPFS manually run the `ipfs.sh` script: + +```bash +./ipfs.sh +``` + +This will run a staging build, adds all contents of the output folder to IPFS and keeps track of this version via its IPFS hash in the `versions` folder. + +Right now, this requires a running `ipfs daemon` on your machine before executing the script. On macOS it's as simple as: + +```bash +brew install ipfs +ipfs daemon +``` + ## Coding conventions ### (S)CSS