Skip to content

Commit

Permalink
Merge pull request #32 from nomeata/master
Browse files Browse the repository at this point in the history
CI: Add a netlify configuration
  • Loading branch information
bogwar authored May 13, 2022
2 parents a6c6f1c + 62826f4 commit 7435fab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .netlify.sh
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
command = "./.netlify.sh"
publish = "_netlify-deploy"

0 comments on commit 7435fab

Please sign in to comment.