-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.52 KB
/
Copy pathdeploy-opencode-proxy.yml
File metadata and controls
52 lines (45 loc) · 1.52 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
name: Deploy OpenCode Proxy to Deno Deploy
on:
workflow_dispatch:
push:
paths:
- 'cloudflare-worker/opencode-proxy/opencode_proxy.ts'
- '.github/workflows/deploy-opencode-proxy.yml'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Install Deno
uses: denoland/setup-deno@v2
with:
# Pinned: Deno 2.9.x ships a broken built-in `deno deploy` CLI
# (JSR @deno/deploy@0.0.9904) that fails every flag with
# 'Option "--org" can only occur once, but was found several times'.
# 2.4.5 is the latest release whose deploy CLI parses flags correctly.
deno-version: 2.4.5
- name: Deploy to Deno Deploy
env:
DENO_DEPLOY_TOKEN: ${{ secrets.DENO_DEPLOY_TOKEN }}
run: |
ORG="android-poweruser"
APP="screenoperator-opencode-proxy"
ENTRYPOINT="cloudflare-worker/opencode-proxy/opencode_proxy.ts"
# Create app if it doesn't exist yet (idempotent)
deno deploy create \
--org="$ORG" \
--app="$APP" \
--token="$DENO_DEPLOY_TOKEN" \
--source=local \
--runtime-mode=dynamic \
--entrypoint="$ENTRYPOINT" \
--region=us 2>&1 || true
# Deploy to production
deno deploy \
--org="$ORG" \
--app="$APP" \
--token="$DENO_DEPLOY_TOKEN" \
--prod \
"$ENTRYPOINT"