mirror of
https://github.com/RGBCube/Site
synced 2025-08-01 13:37:49 +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
17
apply.nu
17
apply.nu
|
@ -1,11 +1,26 @@
|
||||||
#!/usr/bin/env nu
|
#!/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.
|
# Applies the changes to the site by uploading it to the VPS.
|
||||||
def main [] {
|
def main [] {
|
||||||
|
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/
|
LUME_DRAFTS=false deno task build --location https://rgbcu.be/
|
||||||
|
}
|
||||||
|
|
||||||
cd _site
|
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 -
|
cd -
|
||||||
|
|
||||||
echo $"(ansi green)Successfully uploaded!(ansi reset)"
|
echo $"(ansi green)Successfully uploaded!(ansi reset)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue