diff --git a/site/.gitignore b/site/.gitignore index 6635cf5542..65c250dd06 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -8,3 +8,4 @@ node_modules !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* +.vercel diff --git a/site/site.nix b/site/site.nix index 712acf247d..3c1ec71bc4 100644 --- a/site/site.nix +++ b/site/site.nix @@ -1,5 +1,5 @@ { ... }: { - perSystem = { pkgs, lib, nix-filter, ... }: + perSystem = { pkgs, lib, nix-filter, ensureAtRepositoryRoot, ... }: let packageJSON = lib.importJSON ./package.json; in @@ -47,10 +47,25 @@ miniserve --index index.html --spa ${site-static} ''; }; - }; - apps = { - docs-dev-server = { }; + impure-site-deploy = pkgs.writeShellApplication { + name = "impure-site-deploy"; + + runtimeInputs = [ pkgs.nodePackages.vercel ]; + + text = '' + ${ensureAtRepositoryRoot} + + cd site + yarn + yarn build + + export VERCEL_PROJECT_ID=prj_HWQLgBiGFHNPSy5qJ3WpCeX1l492 + export VERCEL_ORG_ID=team_lY7Vs9wFi3Ifb2A24bOxiA68 + + vercel deploy --prebuilt --scope unionbuild + ''; + }; }; }; } diff --git a/site/vercel.json b/site/vercel.json index 4db7bd728f..fc3f72b66f 100644 --- a/site/vercel.json +++ b/site/vercel.json @@ -1,4 +1,4 @@ { - "outputDirectory": "result", - "buildCommand": "nix build .#site-static" + "outputDirectory": "build", + "buildCommand": "yarn build" }