web

A collection of scripts used to generate this website
git clone https://erai.gay/code/web/
Log | Files | Refs | LICENSE

deploy.sh (368B)


      1 #!/bin/bash
      2 set -ue
      3 if [ $# -ne 1 ]; then
      4   echo "Usage: ./deploy.sh <host>"
      5   exit 1
      6 fi
      7 case "$1" in
      8 localhost) target="" ;;
      9 *) target="$1:" ;;
     10 esac
     11 git pull --verify-signatures --ff-only origin main
     12 if [ "$(git show -s --pretty='%G?')" != 'G' ]; then
     13   echo "Failed to verify signature" >&2
     14   exit 1
     15 fi
     16 make clean
     17 make
     18 rsync --delete -vr build/ "${target}/app/web/"