aboutsummaryrefslogtreecommitdiff
path: root/examples/syncblog.sh
diff options
context:
space:
mode:
authorTianhao Wang <tianhao.wang2@mailbox.tu-dresden.de>2023-10-14 00:04:45 +0200
committerTianhao Wang <tianhao.wang2@mailbox.tu-dresden.de>2023-10-14 00:04:45 +0200
commit2580e02140f112e8797807620e36712489039754 (patch)
tree4956d918ecb3d79ff772c52576bfdee20e88a811 /examples/syncblog.sh
init
Diffstat (limited to 'examples/syncblog.sh')
-rw-r--r--examples/syncblog.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/syncblog.sh b/examples/syncblog.sh
new file mode 100644
index 0000000..5661923
--- /dev/null
+++ b/examples/syncblog.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/bash
+
+# THIS IS AN EXAMPLE
+# DON'T RUN ME WITHOUT MODIFYING!
+
+# FOOLPROOF
+echo "do you know what you are doing?"
+exit()
+
+cd <PATH_TO_TIMELINE_BOT>
+echo "Fetching Timeline from fedi..."
+./timelinebot.py
+cp tl.json <PATH_TO_SITE_ROOT_DATA>
+
+cd <PATH_TO_SITE_ROOT>
+echo "Rendering blog..."
+hugo
+
+echo "Sync blog to remote server..."
+rsync -avh -og --chown=http:http --info=progress2 --info=name0 --update --delete-after \
+ <PATH_TO_SITE_ROOT_PUBLIC> \
+ user@remote_server:<PATH_TO_WEB_DOC_ROOT>