[PR #1] [MERGED] Feat: GitHub Action deployment support #1

Closed
opened 2026-03-14 08:27:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anduinnn/2fa/pull/1
Author: @qaz741wsd856
Created: 1/14/2026
Status: Merged
Merged: 1/15/2026
Merged by: @anduinnn

Base: mainHead: add/github-action-deploy


📝 Commits (2)

  • 6037e8c add - GitHub Actions 一键部署支持
  • 6d5f50a fix - 手动指定wrangler版本

📊 Changes

4 files changed (+70 additions, -9 deletions)

View changed files

.github/workflows/deploy-worker.yml (+26 -0)
📝 README.md (+18 -3)
📝 README_EN.md (+19 -4)
📝 wrangler.toml (+7 -2)

📄 Description

添加Github Action 一键部署支持

添加用于自动部署到 Cloudflare Worker 的 GitHub Actions 工作流,支持在 push 到 main 时或手动触发时自动部署 Worker。

变更说明

  • A .github/workflows/deploy-worker.yml:新增 workflow,使用 cloudflare/wrangler-action@v3 执行 wrangler deploy,触发器为 push 到 main 与手动 dispatch。需要在仓库 Secrets 中配置:CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
  • M README.md:更新 GitHub Actions 的说明。
  • M README_EN.md:英文说明同步更新。
  • M wrangler.toml:注释kv的id和预览id。

其他说明

  • 新版本wrangler支持在不填kv id时会自动创建kv,后续部署会复用这个kv,故可以省略。
  • 将id删去后,本仓库支持一键部署,可以添加以下按钮(需替换其中的OWNER/REPO);该方法操作简单,无需配置密钥,但无法一键同步上游的更新,建议fork后用github action部署。
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/OWNER/REPO)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anduinnn/2fa/pull/1 **Author:** [@qaz741wsd856](https://github.com/qaz741wsd856) **Created:** 1/14/2026 **Status:** ✅ Merged **Merged:** 1/15/2026 **Merged by:** [@anduinnn](https://github.com/anduinnn) **Base:** `main` ← **Head:** `add/github-action-deploy` --- ### 📝 Commits (2) - [`6037e8c`](https://github.com/anduinnn/2fa/commit/6037e8ccea6267e7d12016028a4fa95fc2298f49) add - GitHub Actions 一键部署支持 - [`6d5f50a`](https://github.com/anduinnn/2fa/commit/6d5f50ab9251cfea23732bdf4b0dad53ccc7427e) fix - 手动指定wrangler版本 ### 📊 Changes **4 files changed** (+70 additions, -9 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/deploy-worker.yml` (+26 -0) 📝 `README.md` (+18 -3) 📝 `README_EN.md` (+19 -4) 📝 `wrangler.toml` (+7 -2) </details> ### 📄 Description # 添加Github Action 一键部署支持 添加用于自动部署到 Cloudflare Worker 的 GitHub Actions 工作流,支持在 push 到 `main` 时或手动触发时自动部署 Worker。 ## 变更说明 - A `.github/workflows/deploy-worker.yml`:新增 workflow,使用 `cloudflare/wrangler-action@v3` 执行 `wrangler deploy`,触发器为 push 到 `main` 与手动 dispatch。需要在仓库 Secrets 中配置:`CLOUDFLARE_API_TOKEN` 与 `CLOUDFLARE_ACCOUNT_ID`。 - M `README.md`:更新 GitHub Actions 的说明。 - M `README_EN.md`:英文说明同步更新。 - M `wrangler.toml`:注释kv的id和预览id。 ## 其他说明 - 新版本wrangler支持在不填kv id时会自动创建kv,后续部署会复用这个kv,故可以省略。 - 将id删去后,本仓库支持一键部署,可以添加以下按钮(需替换其中的`OWNER/REPO`);该方法操作简单,无需配置密钥,但无法一键同步上游的更新,建议fork后用github action部署。 ```markdown [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/OWNER/REPO) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 08:27:24 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/2fa#1
No description provided.