add:增加action脚本
This commit is contained in:
1 parent
3bcc9ebb99
commit
fa536d876e
5 files changed
+117
-19
No files matched your search
@@ -0,0 +1,30 @@
|
||||
name: Deploy Worker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: "1.3.9"
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
- name: Build admin
|
||||
run: bun run --filter new-api-lite-admin build
|
||||
- name: Apply D1 migrations (remote)
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
run: bunx wrangler d1 migrations apply DB --remote --config apps/worker/wrangler.toml
|
||||
- name: Deploy worker
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
run: bunx wrangler deploy --config apps/worker/wrangler.toml
|
||||
Reference in new issue
Block a user