forked from timothymiller/t4-app
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.21 KB
/
backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: 'Backend Deployment'
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'packages/api/**'
jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: 'Bun setup'
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 'Bun install'
run: bun install
- name: Migrate database
run: cd packages/api && bun run migrate
env:
NO_D1_WARNING: true
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Deploy
uses: cloudflare/[email protected]
with:
wranglerVersion: '3.15.0'
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: packages/api
command: deploy src/worker.ts
packageManager: bun
secrets: |
APP_URL
JWT_VERIFICATION_KEY
CI
env:
APP_URL: ${{ secrets.PUBLIC_APP_URL }}
JWT_VERIFICATION_KEY: ${{ secrets.JWT_VERIFICATION_KEY }}
CI: true
NO_D1_WARNING: true