deploy.sh (536B)
1 #!/bin/env bash 2 set -euo pipefail 3 4 cd "$(dirname "$0")" 5 6 # Clean build, so public/ mirrors exactly the current sources. Together with 7 # rsync --delete, this also removes deleted pages from the server. 8 cargo run --release --manifest-path gabs2/Cargo.toml -- . 9 10 # Never sync an empty or broken build: --delete would wipe the server. 11 if [[ ! -f public/index.html ]]; then 12 echo "public/index.html missing, aborting deploy" >&2 13 exit 1 14 fi 15 16 rsync -avz --delete --chmod=D755,F644 public/ webmaster@mochaccino:/var/www/gboncoffee.dev.br