1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-02 14:07:47 +00:00

Compare commits

..

3 commits

Author SHA1 Message Date
7738256955
fix: upload to both cube and disk hosts 2025-02-23 01:02:46 +03:00
RGBCube
6a7dc4fcf5
Fix Sisyphus blog codeblocks 2024-12-07 21:31:33 +03:00
RGBCube
40d807b671
Fix apply.nu 2024-12-07 21:27:56 +03:00
3 changed files with 2654 additions and 2806 deletions

View file

@ -1,7 +1,13 @@
#!/usr/bin/env nu
def --wrapped sync [...arguments] {
rsync --rsh "ssh -q" --delete-missing-args --recursive --compress ...$arguments
(rsync
--rsh "ssh -q"
--compress
--delete --recursive --force
--delete-excluded
--delete-missing-args
...$arguments)
}
# Applies the changes to the site by uploading it to the VPS.
@ -20,8 +26,22 @@ def main [] {
}
cd _site
[cube disk] | par-each { sync ./ ($in + ":/var/www/site") }
for host in [cube, disk] {
ssh -qtt $host "sudo nu -c '
mkdir /var/www
chown nginx:users -R /var/www
chmod 775 -R /var/www
'"
sync --chown nginx:users ./ ($host + ":/var/www/site")
ssh -qtt $host "sudo nu -c '
chown nginx:users -R /var/www
chmod 775 -R /var/www
'"
}
cd -
echo $"(ansi green)Successfully uploaded!(ansi reset)"
print $"(ansi green)Successfully uploaded!(ansi reset)"
}

5424
deno.lock generated

File diff suppressed because it is too large Load diff

View file

@ -17,7 +17,7 @@ You just started a new project. You ran `cargo init`,
Those commands created the necessary files to work, it
also added the following lines to your .gitignore:
```
```text
target
__pycache__
bin
@ -45,7 +45,7 @@ to gitignore .DS_Store](/assets/github-ds-store-mr-list.webp)
Whatever. You just delete the file from the branch and
add the file's name to the repositories gitignore:
```
```text
target
__pycache__
bin
@ -62,7 +62,7 @@ see that there is a whole directory that is irrelevant.
You tell that person to delete the directory from the
branch and add it to the gitignore. The gitignore lives on:
```
```text
target
__pycache__
bin
@ -73,7 +73,7 @@ bin
Then, someone that uses IntelliJ IDEA commits five hundred
XML files and the `.idea` directory. You repeat this process:
```
```text
target
__pycache__
bin
@ -104,7 +104,7 @@ of files (the gitignore) to a whitelist, by just
ignoring everything and manually un-ignoring desired
files. You change your gitignore to this:
```
```text
*
!.gitignore