From 199555a4432d9901af3401266b4bca2e638d964a Mon Sep 17 00:00:00 2001 From: WZS8 <35448539+ili8@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E6=A1=B6=E6=97=B6=E9=BB=98=E8=AE=A4=E4=B8=BA=E4=BA=9A?= =?UTF-8?q?=E5=A4=AA=E5=9C=B0=E5=8C=BA=E3=80=82token=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E5=92=8C=E4=B8=80=E4=BA=9B=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 +++-- README.md | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 19e1245..928511e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -70,11 +70,12 @@ jobs: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} run: | - # 检查并创建 R2 存储桶 + # 检查并创建 R2 存储桶. 默认创建到(--location=apac)亚太地区。 + # --location= wnam北美西部 / enam北美东部 / weur西欧 /eeur东欧 。根据需要自行修改 BUCKET_INFO=$(wrangler r2 bucket list | grep "buling-imgbed-r2" || echo "") if [ -z "$BUCKET_INFO" ]; then echo "Creating R2 bucket..." - wrangler r2 bucket create buling-imgbed-r2 + wrangler r2 bucket create buling-imgbed-r2 --location=apac else echo "R2 bucket already exists" fi diff --git a/README.md b/README.md index fc1f3f7..bc2dd69 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ - Account.Workers R2 Storage: Read & Write - Account.Workers Scripts: Edit - Account.D1: Edit + - Account.Cloudflare Pages: Edit (建议添加,用于前端项目部署,可复用此token) #### 2. JWT 密钥生成 - 方法一:使用在线 UUID 生成器:[UUID Generator](https://www.uuidgenerator.net/) @@ -103,8 +104,20 @@ JWT_SECRET=your_jwt_secret TG_BOT_TOKEN=your_telegram_bot_token ``` -3. 启用 GitHub Actions -4. 推送代码触发自动部署 +3. 存储桶区域设置(可选): + - 默认在亚太地区创建存储桶 + - 如需更改区域,请修改 `.github\workflows\deploy.toml` 中的以下配置: + ```yaml + wrangler r2 bucket create buling-imgbed-r2 --location= + ``` + - 可选区域: + - `apac` - 亚太地区(默认) + - `wnam` - 北美西部 + - `enam` - 北美东部 + - `weur` - 欧洲西部 + - `eeur` - 欧洲东部 +4. 启用 GitHub Actions +5. 推送代码触发自动部署(首次部署请点击 Actions 页面手动触发) ### 手动部署 @@ -153,7 +166,7 @@ Cloudflare Workers (服务运行时) ## 📞 联系作者 -- 博客:[Anuuu.com](https://annuuu.com) +- 博客:[Anuuu.com](https://anuuu.com) - Telegram:[@wzsxh] ---