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:
parent
8438a30fc1
commit
eb628354c5
1 changed files with 17 additions and 2 deletions
19
apply.nu
19
apply.nu
|
@ -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)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue