1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-07-30 20:47:46 +00:00

Make building and deploying work on Teemux

This commit is contained in:
RGBCube 2024-09-30 12:44:51 +03:00
parent 8438a30fc1
commit eb628354c5
No known key found for this signature in database

View file

@ -1,11 +1,26 @@
#!/usr/bin/env nu
def --wrapped sync [...arguments] {
rsync --rsh "ssh -q" --delete-missing-args --recursive --compress ...$arguments
}
# Applies the changes to the site by uploading it to the VPS.
def main [] {
LUME_DRAFTS=false deno task build --location https://rgbcu.be/
if (pwd | str starts-with "/data/data/com.termux") {
sync ./ nine:site
ssh -qtt nine "
cd site
LUME_DRAFTS=false nix run default#deno -- task build --location https://rgbcu.be/
"
sync nine:site/_site ./
} else {
LUME_DRAFTS=false deno task build --location https://rgbcu.be/
}
cd _site
[cube disk] | par-each { rsync --delete --delete-excluded --recursive --compress ./ ($in + ":/var/www/site") }
[cube disk] | par-each { sync ./ ($in + ":/var/www/site") }
cd -
echo $"(ansi green)Successfully uploaded!(ansi reset)"