#!/usr/bin/env bash set -euo pipefail yarn build # hard coded COS path, change to your real bucket/path COS_TARGET="${COS_TARGET:-cos://gami-public-1377959011/gami-web}" if [[ "${SKIP_COS_UPLOAD:-0}" == "1" || "${SKIP_COS_UPLOAD:-false}" == "true" ]]; then echo "SKIP_COS_UPLOAD is enabled, skipping cos upload." exit 0 fi if ! command -v coscli >/dev/null 2>&1; then echo "coscli not found, skipping cos upload." exit 0 fi coscli cp .output/public "$COS_TARGET" --recursive