#!/usr/bin/env bash

set -euo pipefail

hugo build --minify
incremental-compress \
  -dir public \
  -statedir .compress_state \
  -types html,css,js,json,xml,ico,svg,md,otf,woff,ttf,woff2,webmanifest \
  -zstd=false \
  -verbose
rsync \
  --perms \
  --times \
  --update \
  --partial \
  --progress \
  --recursive \
  --checksum \
  --compress \
  --links \
  --delete-after \
  --owner \
  --usermap "*:bcarlin_net" \
  --group \
  --groupmap "*:bcarlin_net" \
  public/ root@192.168.1.25:/home/bcarlin_net/www
