summaryrefslogtreecommitdiff
path: root/deploy/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/systemd')
-rw-r--r--deploy/systemd/blog-deploy.path9
-rw-r--r--deploy/systemd/blog-deploy.service6
2 files changed, 15 insertions, 0 deletions
diff --git a/deploy/systemd/blog-deploy.path b/deploy/systemd/blog-deploy.path
new file mode 100644
index 00000000..0d0aa632
--- /dev/null
+++ b/deploy/systemd/blog-deploy.path
@@ -0,0 +1,9 @@
+[Unit]
+Description=Watch for deploy signals written by blog.git post-receive hook
+
+[Path]
+PathChanged=/home/somhairle/git/blog.git/deploy.signal
+Unit=blog-deploy.service
+
+[Install]
+WantedBy=default.target
diff --git a/deploy/systemd/blog-deploy.service b/deploy/systemd/blog-deploy.service
new file mode 100644
index 00000000..1d67cb80
--- /dev/null
+++ b/deploy/systemd/blog-deploy.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Blog deploy: build Hexo from blog.git main and publish atomically
+
+[Service]
+Type=oneshot
+ExecStart=/home/somhairle/blog-deploy/scripts/build.sh