set -x
export BUILD_DIR="target/bevy_web/web-release/"
export NAME="chain-reaction-collapse"
export HOST="root@antares.digitalpha.net"
export TARGET_DIR="/var/www/"
# trunk build --release --no-default-features
# bevy build --yes --release web --bundle
# for f in "${BUILD_DIR}/build/"*.wasm; do brotli -c "$f" "$f".br; done
ssh $HOST -C "rm ${TARGET_DIR}/${NAME} -r"
ssh $HOST -C "mkdir -p ${TARGET_DIR}/${NAME}"
scp -r "${BUILD_DIR}/${NAME}" "${HOST}":"${TARGET_DIR}"/
# scp ${BUILD_DIR}/index.html "${HOST}":"${TARGET_DIR}"/
# scp -r ${BUILD_DIR}/assets "${HOST}":"${TARGET_DIR}"/
# scp ${BUILD_DIR}/build/*.js "${HOST}":"${TARGET_DIR}"/build/
# scp ${BUILD_DIR}/build/*.wasm* "${HOST}":"${TARGET_DIR}"/build/
