From 066f120134cba0c03ac5da544eabc8d803ea4e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Mon, 13 Apr 2026 09:18:04 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20add=20CD=20=E2=80=94=20auto=20deploy=20to?= =?UTF-8?q?=20Cloudflare=20Workers=20on=20push=20to=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test → Build UI → wrangler deploy. Secrets configured. 小橘 🍊(NEKO Team) --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 312baba..c54fe4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,3 +16,21 @@ jobs: node-version: 22 - run: npm install - run: npm test + + deploy: + needs: test + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - run: npm install + - name: Build UI + run: cd packages/engine/ui && npm run build && cp dist/index.html ../src/ui.html + - name: Deploy to Cloudflare Workers + run: cd packages/engine && npx wrangler deploy + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}