34 lines
690 B
YAML
34 lines
690 B
YAML
name: Deploy to Cloudflare Workers
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy to Cloudflare Workers
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install Dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Run Tests
|
|
run: bun test
|
|
|
|
- name: Deploy Worker
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
command: deploy
|
|
wranglerVersion: "4.110.0"
|