From 89918ecf5cba98035f5c54f15b0a592754c618d0 Mon Sep 17 00:00:00 2001 From: Vaica <94612053+zqlit@users.noreply.github.com> Date: Sun, 8 Feb 2026 18:48:45 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=9B=BD=E9=99=85=E7=89=88=E9=83=A8?= =?UTF-8?q?=E7=BD=B2edgeone=E8=BE=83=E6=85=A2=E7=9A=84=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- scripts/deploy_edgeone.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17a9d44f..7e5a7a31 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -86,7 +86,7 @@ jobs: EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_API_TOKEN }} run: | chmod +x scripts/deploy_edgeone.sh - ./scripts/deploy_edgeone.sh hugo-blog ./public + ./scripts/deploy_edgeone.sh hugo-blog ./public overseas - name: Debug Environment Variables run: | diff --git a/scripts/deploy_edgeone.sh b/scripts/deploy_edgeone.sh index b7553cd0..998dc080 100644 --- a/scripts/deploy_edgeone.sh +++ b/scripts/deploy_edgeone.sh @@ -11,14 +11,18 @@ fi # 2. Set default values if not provided PROJECT_NAME=${1:-"hugo-blog"} BUILD_DIR=${2:-"./public"} +AREA=${3:-"overseas"} # 默认为 overseas,因为用户切换到了国际站 echo "Deploying to EdgeOne Pages..." echo "Project: $PROJECT_NAME" echo "Directory: $BUILD_DIR" +echo "Area: $AREA" # 3. Execute deployment command # We use npx to run the edgeone CLI without global installation -npx edgeone pages deploy "$BUILD_DIR" -n "$PROJECT_NAME" -t "$EDGEONE_API_TOKEN" +# 注意:国际站必须加 --area overseas 参数 +npx edgeone pages deploy "$BUILD_DIR" -n "$PROJECT_NAME" -t "$EDGEONE_API_TOKEN" --area "$AREA" + # 4. Check exit code if [ $? -eq 0 ]; then