Skip to content

chore: wrangler.toml #42

chore: wrangler.toml

chore: wrangler.toml #42

Workflow file for this run

name: Staging Deploy
on:
pull_request:
branches:
- main
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci . || exit 1
build-api:
runs-on: ubuntu-latest
needs: [quality]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check if API files changed
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: src/*.{ts,js}
- name: Checkout
uses: actions/checkout@v4
- name: Install
if: steps.changed-files.outputs.any_changed == 'true'
uses: ./github-actions/install
- name: Build API to Cloudflare bundle
if: steps.changed-files.outputs.any_changed == 'true'
run: bun wrangler deploy --dry-run --outdir dist
- name: Deploy API to Cloudflare Worker (Production)
if: steps.changed-files.outputs.any_changed == 'true'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: bun run wrangler deploy