Няма описание

publish-legal-site.sh 866B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. # Publishes legal/ to Surge (free static hosting) for preview or production.
  3. # Usage: ./scripts/publish-legal-site.sh [subdomain]
  4. # Example: ./scripts/publish-legal-site.sh app-for-indeed
  5. set -euo pipefail
  6. ROOT="$(cd "$(dirname "$0")/.." && pwd)"
  7. LEGAL="$ROOT/legal"
  8. DOMAIN="${1:-app-for-indeed}"
  9. if ! command -v npx >/dev/null 2>&1; then
  10. echo "Error: npx is required (install Node.js)." >&2
  11. exit 1
  12. fi
  13. echo "Publishing $LEGAL to https://${DOMAIN}.surge.sh"
  14. cd "$LEGAL"
  15. npx --yes surge . "${DOMAIN}.surge.sh"
  16. echo ""
  17. echo "Live URLs:"
  18. echo " https://${DOMAIN}.surge.sh/index.html"
  19. echo " https://${DOMAIN}.surge.sh/home.html"
  20. echo " https://${DOMAIN}.surge.sh/support.html"
  21. echo " https://${DOMAIN}.surge.sh/contact.html"
  22. echo " https://${DOMAIN}.surge.sh/terms-of-service.html"
  23. echo " https://${DOMAIN}.surge.sh/privacy-policy.html"