aboutsummaryrefslogtreecommitdiff
path: root/post-receive
diff options
context:
space:
mode:
authorAnthony Wang2024-12-11 20:08:08 -0500
committerAnthony Wang2024-12-11 20:08:08 -0500
commit4df556361db729da3f0f5f0cd5f1a11b8f32434a (patch)
treeb494735433e67c316dd35c610abc147a7372046b /post-receive
parentf1f0fae573170fbc051ceaed881bb8a1e3cf4fb4 (diff)
Build to tmp then replace live site, add build instructions to README
Diffstat (limited to 'post-receive')
-rw-r--r--post-receive7
1 files changed, 5 insertions, 2 deletions
diff --git a/post-receive b/post-receive
index 15f816f..9276a99 100644
--- a/post-receive
+++ b/post-receive
@@ -11,6 +11,9 @@ cd $(git worktree list | grep master | cut -d' ' -f1)
git submodule update
# Manually copy static since btrfs COW is super fast
+cp -r static /srv/http/tmp
+hugo --destination /srv/http/tmp
+
+# Replace with new build
rm -r /srv/http/www
-cp -r static /srv/http/www
-hugo --destination /srv/http/www
+mv /srv/http/tmp /srv/http/www