mirror of
https://github.com/findingfrankie/laconic-astrowind.git
synced 2026-01-25 08:04:09 +00:00
34 lines
933 B
Bash
Executable File
34 lines
933 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script enables deployment of the Laconic website to Laconic Network Service Providers.
|
|
# These are independent operators of bare metal k8s, each running the Laconic
|
|
# automated deployment infrastructure. By publishing records onchain and sending
|
|
# payment, various services can be deployed in many jurisdictions.
|
|
#
|
|
# The linked deploy script will be triggered by new releases via Actions.
|
|
#
|
|
# https://git.vdb.to/LaconicNetwork/hosted-frontends/src/branch/main/deploy.sh
|
|
|
|
OUTPUT_DIR="./dist"
|
|
DEST_DIR=${1:-/data}
|
|
|
|
if [[ -d "$DEST_DIR" ]]; then
|
|
echo "${DEST_DIR} already exists." 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
# Install dependencies and build
|
|
echo "Installing dependencies..."
|
|
npm install || exit 1
|
|
|
|
echo "Building application..."
|
|
npm run build || exit 1
|
|
|
|
if [[ ! -d "$OUTPUT_DIR" ]]; then
|
|
echo "Missing output directory: $OUTPUT_DIR" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Moving build output to ${DEST_DIR}..."
|
|
mv "$OUTPUT_DIR" "$DEST_DIR"
|