diff --git a/.netlify.sh b/.netlify.sh new file mode 100755 index 000000000..d91fcfdb3 --- /dev/null +++ b/.netlify.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# +# Deploy a preview of the interface specification to netlify +# + +set -e + +export NP_GIT=$(which git) + +wget -nv https://github.com/DavHau/nix-portable/releases/download/v009/nix-portable +chmod +x nix-portable + +./nix-portable nix-build -A interface-spec default.nix + +# The "result" symlink only valid inside the nix-portable sandbox, so use nix-shell +./nix-portable nix-shell -p bash --run "cp -rL result/spec/ _netlify-deploy" + +chmod -R u+w _netlify-deploy diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000..1d4a4ec08 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,3 @@ +[build] + command = "./.netlify.sh" + publish = "_netlify-deploy"