#!/usr/bin/env bash
# 快速部署 HTML 和配置文件
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
SFTP_USER="${SFTP_USER:-witmatec}"
SFTP_HOST="${SFTP_HOST:-74.220.219.141}"
REMOTE_DIR="${REMOTE_DIR:-/home1/witmatec/public_html/amipro}"

echo "Deploying HTML files to $SFTP_USER@$SFTP_HOST:$REMOTE_DIR"
echo "You will be prompted for your password."

sftp "$SFTP_USER@$SFTP_HOST" << SFTP_COMMANDS
cd $REMOTE_DIR
mput *.html
mput llms.txt
mput sitemap.xml
mput robots.txt
put .htaccess
bye
SFTP_COMMANDS

echo "HTML files deployed. Run 'bash deploy-amipro.sh' for full deployment."
