aboutsummaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-11-23 21:44:30 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-11-23 21:44:30 +0530
commit3e8089ec3c6d887a36d6605e534324f492d8815b (patch)
treed68ce7dec29197ab2a1534b863a9319083de342e /.scripts
parentc165b8dc7607cfa3ca0fda0c8b4f172bb5898adf (diff)
added hugo-upload script
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/hugo-upload12
1 files changed, 12 insertions, 0 deletions
diff --git a/.scripts/hugo-upload b/.scripts/hugo-upload
new file mode 100755
index 0000000..3c45a0f
--- /dev/null
+++ b/.scripts/hugo-upload
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+if [ -f .hugo_upload ]; then
+ source .hugo_upload
+
+ rm -r public/
+ hugo --quiet
+
+ rsync -rtvzP public/ "$user@$host:$target_dir"
+else
+ echo ".hugo_upload file not found in $(pwd)"
+fi