aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.toml6
-rw-r--r--post-receive12
2 files changed, 18 insertions, 0 deletions
diff --git a/config.toml b/config.toml
index aa24969..9460ff1 100644
--- a/config.toml
+++ b/config.toml
@@ -59,3 +59,9 @@ theme = 'gokarna'
[minify]
minifyOutput = true
+
+# Speed up builds on XVM which has a slow btrfs disk so delete and COW is way faster
+[[module.mounts]]
+source = 'static'
+target = 'static'
+excludeFiles = '*'
diff --git a/post-receive b/post-receive
new file mode 100644
index 0000000..d888042
--- /dev/null
+++ b/post-receive
@@ -0,0 +1,12 @@
+# Solution to
+# remote: fatal: not a git repository: '.'
+unset GIT_DIR
+
+cd /var/lib/forgejo/website
+git pull
+git submodule update
+
+# Manually copy static since btrfs COW is super fast
+rm -r /srv/http/www
+cp -r static /srv/http/www
+hugo --destination /srv/http/www