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