-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (84 loc) · 2.3 KB
/
Copy pathdeploy-rag.yml
File metadata and controls
94 lines (84 loc) · 2.3 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Deploy Demos
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "rag/**"
- "esign/**"
- "template-builder/**"
- ".github/workflows/deploy-rag.yml"
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
jobs:
check:
name: Lint & Typecheck
runs-on: ubuntu-latest
defaults:
run:
working-directory: rag
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bunx biome check .
- run: bunx tsc --noEmit
deploy-api:
name: Deploy API Worker
needs: check
runs-on: ubuntu-latest
defaults:
run:
working-directory: rag
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bunx wrangler deploy
working-directory: rag/apps/api
deploy-web:
name: Deploy All Demos
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
# Build DocRAG
- run: bun install
working-directory: rag
- run: bunx vite build
working-directory: rag/apps/web
env:
VITE_API_URL: ${{ vars.VITE_API_URL }}
BASE_PATH: /docrag/
# Build eSign
- run: bun install
working-directory: esign
- run: bunx vite build
working-directory: esign
env:
BASE_PATH: /esign/
# Build Template Builder
- run: bun install
working-directory: template-builder
- run: bunx vite build
working-directory: template-builder
env:
BASE_PATH: /template-builder/
# Assemble dist
- run: |
mkdir -p dist/docrag dist/esign dist/template-builder
cp -r rag/apps/web/dist/* dist/docrag/
cp -r esign/dist/* dist/esign/
cp -r template-builder/dist/* dist/template-builder/
cp dist-landing/index.html dist/
cp -r functions dist/functions
# Deploy
- run: bunx wrangler pages deploy dist --project-name=superdoc-demos --commit-dirty=true