personal website: delete stale files
[web.git] / personal / upload.sh
index 4c4d7c6a6cd1eb5ebb2229bcad71c426f8786375..76dac8be4e23d1530d7e4ea8a39c1aba17b3b1b8 100755 (executable)
@@ -3,4 +3,13 @@ cd "$(dirname "$0")"
 
 jekyll build
 cd _site
-rsync ./ ralfj.de:srv/www.ralfj.de/docroot/ -aP
+
+git add .
+git diff --cached
+git commit -m "site upload"
+
+# To include `projects/rust-101/index.html` while excluding the rest of that folder, we have to
+# write the exclusion as ".../*", or else rsync would not even descend into that directory.
+rsync ./ www.ralfj.de:/srv/www.ralfj.de/docroot/ -aP --delete \
+    --include projects/rust-101/index.html \
+    --exclude .git --exclude cs --exclude upload --exclude "projects/rust-101/*"