mirror of
https://github.com/RGBCube/Site
synced 2025-08-03 14:37:46 +00:00
Compare commits
No commits in common. "77382569550b689c606e2f6af20fc6a53ce66f7f" and "49527966af17511036f4f82182b0d2fd51472991" have entirely different histories.
7738256955
...
49527966af
3 changed files with 2807 additions and 2655 deletions
26
apply.nu
26
apply.nu
|
@ -1,13 +1,7 @@
|
||||||
#!/usr/bin/env nu
|
#!/usr/bin/env nu
|
||||||
|
|
||||||
def --wrapped sync [...arguments] {
|
def --wrapped sync [...arguments] {
|
||||||
(rsync
|
rsync --rsh "ssh -q" --delete-missing-args --recursive --compress ...$arguments
|
||||||
--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.
|
# Applies the changes to the site by uploading it to the VPS.
|
||||||
|
@ -26,22 +20,8 @@ def main [] {
|
||||||
}
|
}
|
||||||
|
|
||||||
cd _site
|
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 -
|
cd -
|
||||||
|
|
||||||
print $"(ansi green)Successfully uploaded!(ansi reset)"
|
echo $"(ansi green)Successfully uploaded!(ansi reset)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ You just started a new project. You ran `cargo init`,
|
||||||
Those commands created the necessary files to work, it
|
Those commands created the necessary files to work, it
|
||||||
also added the following lines to your .gitignore:
|
also added the following lines to your .gitignore:
|
||||||
|
|
||||||
```text
|
```
|
||||||
target
|
target
|
||||||
__pycache__
|
__pycache__
|
||||||
bin
|
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
|
Whatever. You just delete the file from the branch and
|
||||||
add the file's name to the repositories gitignore:
|
add the file's name to the repositories gitignore:
|
||||||
|
|
||||||
```text
|
```
|
||||||
target
|
target
|
||||||
__pycache__
|
__pycache__
|
||||||
bin
|
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
|
You tell that person to delete the directory from the
|
||||||
branch and add it to the gitignore. The gitignore lives on:
|
branch and add it to the gitignore. The gitignore lives on:
|
||||||
|
|
||||||
```text
|
```
|
||||||
target
|
target
|
||||||
__pycache__
|
__pycache__
|
||||||
bin
|
bin
|
||||||
|
@ -73,7 +73,7 @@ bin
|
||||||
Then, someone that uses IntelliJ IDEA commits five hundred
|
Then, someone that uses IntelliJ IDEA commits five hundred
|
||||||
XML files and the `.idea` directory. You repeat this process:
|
XML files and the `.idea` directory. You repeat this process:
|
||||||
|
|
||||||
```text
|
```
|
||||||
target
|
target
|
||||||
__pycache__
|
__pycache__
|
||||||
bin
|
bin
|
||||||
|
@ -104,7 +104,7 @@ of files (the gitignore) to a whitelist, by just
|
||||||
ignoring everything and manually un-ignoring desired
|
ignoring everything and manually un-ignoring desired
|
||||||
files. You change your gitignore to this:
|
files. You change your gitignore to this:
|
||||||
|
|
||||||
```text
|
```
|
||||||
*
|
*
|
||||||
|
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue