[blazestar.net] Sets up auto-deploy of an npm-based app.
This commit is contained in:
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user