mirror of
https://github.com/RGBCube/Site
synced 2025-08-02 05:57:46 +00:00
Compare commits
3 commits
49527966af
...
7738256955
Author | SHA1 | Date | |
---|---|---|---|
7738256955 | |||
![]() |
6a7dc4fcf5 | ||
![]() |
40d807b671 |
3 changed files with 2654 additions and 2806 deletions
26
apply.nu
26
apply.nu
|
@ -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)"
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue