[blazestar.net] Sets up auto-deploy of an npm-based app.

This commit is contained in:
2025-06-24 14:28:59 -07:00
parent 1bfec397b5
commit 286701ba83
2 changed files with 19 additions and 8 deletions

View File

@@ -40,6 +40,12 @@ in
host = terakoda;
dir = "dist";
}
// mkStaticSite { host = havenisms; }
// mkStaticSite { host = blazestar; };
// mkStaticSite {
host = blazestar;
dir = "dist";
}
// mkStaticSite {
host = havenisms;
dir = "public";
};
}

View File

@@ -19,7 +19,7 @@ let
pwd
export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${
config.sops.secrets."deploy-key/terakoda.com".path
config.sops.secrets."deploy-key/mcp".path
}"'
# Disable astro telemetry otherwise it will try to write to `~/.config/astro/config.json`
@@ -39,11 +39,7 @@ let
in
{
sops.secrets = {
"deploy-key/terakoda.com" = {
restartUnits = [ "webhook.service" ];
owner = config.users.users.webhook.name;
};
"deploy-key/dm.terakoda.com" = {
"deploy-key/mcp" = {
restartUnits = [ "webhook.service" ];
owner = config.users.users.webhook.name;
};
@@ -104,6 +100,15 @@ in
trigger-rule-mismatch-http-response-code = 400;
inherit trigger-rule;
};
"deploy-blazestar-net" = {
id = "deploy-blazestar-net";
http-methods = [ "POST" ];
command-working-directory = "/tank/web/blazestar.net";
include-command-output-in-response-on-error = true;
execute-command = "${testHook}/bin/build-npm-app";
trigger-rule-mismatch-http-response-code = 400;
inherit trigger-rule;
};
};
};
}