mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:55:42 +00:00
Use App Platform hosting for Eagle0pedia (#8397)
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SITE_DIR="${1:-bazel-bin/docs/eagle0pedia/dist}"
|
||||
DO_ENDPOINT="${DO_SPACES_ENDPOINT:-https://sfo3.digitaloceanspaces.com}"
|
||||
DO_BUCKET="${EAGLE0PEDIA_SPACES_BUCKET:?EAGLE0PEDIA_SPACES_BUCKET must be set}"
|
||||
|
||||
if [ ! -d "${SITE_DIR}" ]; then
|
||||
echo "ERROR: Eagle0pedia site output not found at ${SITE_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v aws >/dev/null 2>&1; then
|
||||
echo "ERROR: aws CLI is required to deploy Eagle0pedia"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export AWS_ACCESS_KEY_ID="${EAGLE0PEDIA_SPACES_ACCESS_KEY:?EAGLE0PEDIA_SPACES_ACCESS_KEY must be set}"
|
||||
export AWS_SECRET_ACCESS_KEY="${EAGLE0PEDIA_SPACES_SECRET_KEY:?EAGLE0PEDIA_SPACES_SECRET_KEY must be set}"
|
||||
|
||||
echo "Deploying Eagle0pedia from ${SITE_DIR}"
|
||||
echo "Target: s3://${DO_BUCKET}/"
|
||||
|
||||
aws s3 sync "${SITE_DIR}" "s3://${DO_BUCKET}/" \
|
||||
--endpoint-url "${DO_ENDPOINT}" \
|
||||
--acl public-read \
|
||||
--delete
|
||||
|
||||
echo "Eagle0pedia deploy complete"
|
||||
Reference in New Issue
Block a user