#!/bin/bash fail() { echo "$*" >&2 exit 1 } npm run build || fail "Unable to build frontend" # Copy the built files to the deployed directory rsync -avprl --delete build/ deployed/ || fail "Unable to copy built files to deployed directory"