]> shtarkov.net Git - shtarkov.net.git/commitdiff
Add deployment command
authorChristian Shtarkov <ops+git@shtarkov.net>
Sun, 20 Oct 2024 21:31:01 +0000 (22:31 +0100)
committerChristian Shtarkov <ops+git@shtarkov.net>
Sun, 20 Oct 2024 21:31:04 +0000 (22:31 +0100)
onerc.el

index 20f13cd633889581e7225be7f18db6e4fd30b2b4..7c2fe575130f2fd2c309036c464dd4e43a3699a6 100644 (file)
--- a/onerc.el
+++ b/onerc.el
@@ -169,3 +169,13 @@ INFO is a plist holding contextual information."
                  href (or (org-string-nw-p desc) href)))
         (format "<a href=\"%s\">%s</a>"
                 href (or (org-string-nw-p desc) href)))))
+
+(defun shtarkov.net-build-and-deploy ()
+  (interactive)
+  (unless (string-equal (buffer-name) "shtarkov.net.org")
+    (user-error "Must be visiting the proper file."))
+  (when (yes-or-no-p "Do you want to build and deploy shtarkov.net?")
+    (one-build)
+    (async-shell-command
+     "rsync -avz public/ shtarkov.net:public_html/"
+     (format "*deploy shtarkov.net*"))))