1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-07-30 12:37:50 +00:00

apply.nu: separate prod dir

This commit is contained in:
RGBCube 2025-06-06 23:27:38 +03:00
parent 8ece44e462
commit 60ed940598
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -11,20 +11,23 @@ def --wrapped sync [...arguments] {
# Applies the changes to the site by uploading it to the VPS.
def main [] {
const dest_directory = "_site_production"
const deno_arguments = [ "task", "build", "--dest", $dest_directory, "--location", "https://rgbcu.be/" ]
if (pwd | str starts-with "/data/data/com.termux") {
sync ./ nine:site
ssh -tt nine "
ssh -tt nine $"
cd site
LUME_DRAFTS=false nix run default#deno -- task build --location https://rgbcu.be/
LUME_DRAFTS=false nix run nixpkgs#deno -- ($deno_arguments | str join ' ')
"
sync nine:site/_site ./
sync ("nine:site/" + $dest_directory) ./
} else {
LUME_DRAFTS=false deno task build --location https://rgbcu.be/
LUME_DRAFTS=false deno ...$deno_arguments
}
cd _site
cd $dest_directory
let host = "root@best";