32 lines
722 B
YAML
32 lines
722 B
YAML
name: Deploy to Cloudflare Workers
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
working-directory: proxy-bun
|
|
|
|
- name: Build worker
|
|
run: bun run build:worker
|
|
working-directory: proxy-bun
|
|
|
|
- name: Deploy to Cloudflare
|
|
run: bunx wrangler deploy
|
|
working-directory: proxy-bun
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|