feat: added deployment flow
This commit is contained in:
parent
af43876fcb
commit
f0a030c44a
5 changed files with 186 additions and 2 deletions
47
nix/package.nix
Normal file
47
nix/package.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
nodejs_latest,
|
||||
pnpm_10,
|
||||
fetchPnpmDeps,
|
||||
pnpmConfigHook,
|
||||
}: let
|
||||
nodejs = nodejs_latest;
|
||||
pnpm = pnpm_10;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "volpe";
|
||||
version = "1.0.0";
|
||||
|
||||
src = lib.cleanSource ./..;
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
pnpm
|
||||
pnpmConfigHook
|
||||
];
|
||||
|
||||
# fetchPnpmDeps creates the offline store
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-AiyDVGSxlfdqzuei0N0F3UOXlQVztxqyU7gBkZbUqOI=";
|
||||
fetcherVersion = 3; # pnpm store version
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
pnpm build
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r _site/* $out/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue