diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..3c1743f --- /dev/null +++ b/deploy.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# 部署 Portal 到服务器 +# 用法: ./deploy.sh + +SERVER="154.8.162.18" +USER="root" +PASS="Why_701208" +REMOTE_PATH="/var/www/portal" +LOCAL_FILE="index.html" + +echo "正在上传 ${LOCAL_FILE} 到 ${SERVER}:${REMOTE_PATH}..." +sshpass -p "${PASS}" scp -o StrictHostKeyChecking=no "${LOCAL_FILE}" "${USER}@${SERVER}:${REMOTE_PATH}/${LOCAL_FILE}" + +if [ $? -ne 0 ]; then + echo "上传失败" + exit 1 +fi + +echo "正在重载 Nginx..." +sshpass -p "${PASS}" ssh -o StrictHostKeyChecking=no "${USER}@${SERVER}" "nginx -s reload" + +if [ $? -ne 0 ]; then + echo "Nginx 重载失败" + exit 1 +fi + +echo "部署完成: https://portal.all8ai.top/" diff --git a/index.html b/index.html index 6345baf..ff08653 100644 --- a/index.html +++ b/index.html @@ -10,22 +10,145 @@ @@ -467,6 +652,10 @@ 20 个智能应用在线 / 20 Apps Online + @@ -510,6 +699,10 @@ @@ -549,6 +742,12 @@ diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..94b6f9a --- /dev/null +++ b/netlify.toml @@ -0,0 +1,8 @@ +[build] + publish = "." + command = "" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200