Skip to content

Commit

Permalink
fix(site): temporarily make builds impure
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Oct 18, 2023
1 parent 987721e commit 70ed5e2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vercel
23 changes: 19 additions & 4 deletions site/site.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ ... }: {
perSystem = { pkgs, lib, nix-filter, ... }:
perSystem = { pkgs, lib, nix-filter, ensureAtRepositoryRoot, ... }:
let
packageJSON = lib.importJSON ./package.json;
in
Expand Down Expand Up @@ -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
'';
};
};
};
}
4 changes: 2 additions & 2 deletions site/vercel.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"outputDirectory": "result",
"buildCommand": "nix build .#site-static"
"outputDirectory": "build",
"buildCommand": "yarn build"
}

0 comments on commit 70ed5e2

Please sign in to comment.