feat: add workflow to import KV ID from NodeWarden2 and update README for deployment instructions

This commit is contained in:
shuaiplus
2026-03-07 03:47:21 +08:00
parent 23c78b3408
commit ca194da822
4 changed files with 82 additions and 22 deletions
+7 -8
View File
@@ -55,8 +55,6 @@
### One-click deploy
**Deploy steps:**
> **If you only want a quick trial, simply click the one-click deploy button in step 2. The remaining steps are mainly for long-term maintenance.**
1. Fork this repository and name it **NodeWarden**.
@@ -76,19 +74,20 @@
>- **KV**: no card required; **single attachment / Send file limit is 25 MiB** (Cloudflare limit, not editable); **1 GB free storage**
>
>1. Fork this repository and name it **NodeWarden**.
>2. Open your GitHub repository, go to the `Actions` page, and run **Switch to KV mode** (this automatically switches [wrangler.toml](./wrangler.toml) to the KV configuration).
>3. **In your own repository**, click the button below. On the page that opens, rename the project to **NodeWarden2** and set **JWT_SECRET** to a random 32-character string.
>2. Open your new repository, go to `Actions`, click `I understand my workflows, go ahead and enable them`, then run `Switch to KV mode`.
>3. After that, **in your own repository**, click the button below. On the page that opens, rename the project to **NodeWarden2** and set **JWT_SECRET** to a random 32-character string.
>
> [![Deploy](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/shuaiplus/NodeWarden)
>
>4. After deployment, open the Worker settings on the same page and disconnect the **Git repository**.
>5. Reconnect the **Git repository** to the fork from step 1, then change the **Name** field at the bottom to **NodeWarden**.
>6. The GitHub repository **NodeWarden2** can be deleted.
>4. On the same page, open the Worker settings and disconnect the `Git repository`.
>5. Go back to your forked repository (**NodeWarden**) on GitHub, open `Actions`, and run `Import KV ID from NodeWarden2`.
>6. Return to Cloudflare, reconnect the `Git repository` to your forked repository (**NodeWarden**), and change the `Name` field at the bottom back to **NodeWarden**.
>7. The GitHub repository **NodeWarden2** can then be deleted.
</details>
> [!TIP]
> Sync upstream (keep your fork updated):
>- Manual: open your fork on GitHub and click `Sync fork` when prompted.
>- Manual: open your fork on GitHub and click `Sync fork` when prompted. Do not click `Contribute`.
>- Automatic: in your fork, go to `Actions`, click `I understand my workflows, go ahead and enable them`. Once enabled, `Sync upstream` will automatically sync the upstream `main` branch every day at 3 AM and keep your current [wrangler.toml](./wrangler.toml) configuration unchanged.
### CLI deploy