fixed 部署通知
This commit is contained in:
1 parent
d13c6e4d85
commit
7dad54d798
5 files changed
+147
-4
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# EdgeOne Pages Deployment Script
|
||||
|
||||
# 1. Verify required environment variables
|
||||
if [ -z "$EDGEONE_API_TOKEN" ]; then
|
||||
echo "Error: EDGEONE_API_TOKEN is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. Set default values if not provided
|
||||
PROJECT_NAME=${1:-"hugo-blog"}
|
||||
BUILD_DIR=${2:-"./public"}
|
||||
|
||||
echo "Deploying to EdgeOne Pages..."
|
||||
echo "Project: $PROJECT_NAME"
|
||||
echo "Directory: $BUILD_DIR"
|
||||
|
||||
# 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"
|
||||
|
||||
# 4. Check exit code
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Deployment successful!"
|
||||
else
|
||||
echo "Deployment failed!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user