diff options
author | Anthony Wang | 2024-12-03 23:47:50 -0500 |
---|---|---|
committer | Anthony Wang | 2024-12-03 23:47:50 -0500 |
commit | 6c7c3f5a90ecec1eb8c019c0ce50075e39c39741 (patch) | |
tree | 98367dd3e29b36ef66d15335fe7c3c981faee205 | |
parent | f3bf5f2aeb8019b6ae080e5dcb91485e4f7a5efd (diff) |
Manually copy static since btrfs can do it faster than Hugo's https://github.com/gohugoio/hugo/blob/487bb96474363070a9b5b22ce4640f80329e91e4/commands/hugobuilder.go#L437
-rw-r--r-- | config.toml | 6 | ||||
-rw-r--r-- | post-receive | 12 |
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 |