From fd87f4e07c893f695719f7261ca15e688483a123 Mon Sep 17 00:00:00 2001 From: johnnash2025 Date: Thu, 29 May 2025 21:14:30 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Cloudflare=20Workers=E7=94=A8CI/CD?= =?UTF-8?q?=EF=BC=88GitHub=20Actions=EF=BC=89=E3=81=A8wrangler.toml?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20-=20OpenWEBUI=E8=87=AA=E5=8B=95=E3=83=87?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=82=A4=E5=9F=BA=E7=9B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ wrangler.toml | 5 +++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 wrangler.toml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..50bfd603d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy to Cloudflare Workers + +on: + push: + branches: + - main # デプロイしたいブランチ名に合わせて変更可 + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm install + + - name: Build for Cloudflare Workers + run: npx wrangler build + + - name: Publish to Cloudflare Workers + run: npx wrangler publish + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 000000000..63fb4ce09 --- /dev/null +++ b/wrangler.toml @@ -0,0 +1,5 @@ +name = "openwebui" +main = "dist/worker.js" +account_id = "YOUR_CLOUDFLARE_ACCOUNT_ID" +workers_dev = true +compatibility_date = "2024-05-29"