[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; host = terakoda;
dir = "dist"; dir = "dist";
} }
// mkStaticSite { host = havenisms; } // mkStaticSite {
// mkStaticSite { host = blazestar; }; host = blazestar;
dir = "dist";
}
// mkStaticSite {
host = havenisms;
dir = "public";
};
} }

View File

@@ -19,7 +19,7 @@ let
pwd pwd
export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${ 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` # Disable astro telemetry otherwise it will try to write to `~/.config/astro/config.json`
@@ -39,11 +39,7 @@ let
in in
{ {
sops.secrets = { sops.secrets = {
"deploy-key/terakoda.com" = { "deploy-key/mcp" = {
restartUnits = [ "webhook.service" ];
owner = config.users.users.webhook.name;
};
"deploy-key/dm.terakoda.com" = {
restartUnits = [ "webhook.service" ]; restartUnits = [ "webhook.service" ];
owner = config.users.users.webhook.name; owner = config.users.users.webhook.name;
}; };
@@ -104,6 +100,15 @@ in
trigger-rule-mismatch-http-response-code = 400; trigger-rule-mismatch-http-response-code = 400;
inherit trigger-rule; 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;
};
}; };
}; };
} }