fixed 国际版部署edgeone较慢的原因
This commit is contained in:
1 parent
7ae53899f2
commit
89918ecf5c
2 files changed
+6
-2
No files matched your search
@@ -86,7 +86,7 @@ jobs:
|
|||||||
EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_API_TOKEN }}
|
EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_API_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
chmod +x scripts/deploy_edgeone.sh
|
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
|
- name: Debug Environment Variables
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -11,14 +11,18 @@ fi
|
|||||||
# 2. Set default values if not provided
|
# 2. Set default values if not provided
|
||||||
PROJECT_NAME=${1:-"hugo-blog"}
|
PROJECT_NAME=${1:-"hugo-blog"}
|
||||||
BUILD_DIR=${2:-"./public"}
|
BUILD_DIR=${2:-"./public"}
|
||||||
|
AREA=${3:-"overseas"} # 默认为 overseas,因为用户切换到了国际站
|
||||||
|
|
||||||
echo "Deploying to EdgeOne Pages..."
|
echo "Deploying to EdgeOne Pages..."
|
||||||
echo "Project: $PROJECT_NAME"
|
echo "Project: $PROJECT_NAME"
|
||||||
echo "Directory: $BUILD_DIR"
|
echo "Directory: $BUILD_DIR"
|
||||||
|
echo "Area: $AREA"
|
||||||
|
|
||||||
# 3. Execute deployment command
|
# 3. Execute deployment command
|
||||||
# We use npx to run the edgeone CLI without global installation
|
# 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
|
# 4. Check exit code
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user