Skip to content

Commit aaf1efd

Browse files
fix: restore simple working deploy format for kilo-proxy
1 parent 991a5a4 commit aaf1efd

1 file changed

Lines changed: 25 additions & 24 deletions

File tree

‎.github/workflows/deploy-kilo-proxy.yml‎

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,33 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818

19-
- name: Deploy to Deno Deploy
20-
uses: denoland/deployctl@v1
19+
- name: Install Deno
20+
uses: denoland/setup-deno@v2
2121
with:
22-
project: screenoperator-kilo-proxy
23-
entrypoint: kilo_proxy.ts
24-
root: cloudflare-worker/kilo-proxy
25-
token: ${{ secrets.DENO_DEPLOY_TOKEN }}
22+
deno-version: v2.x
2623

27-
- name: Verify proxy is alive
24+
- name: Deploy to Deno Deploy
25+
env:
26+
DENO_DEPLOY_TOKEN: ${{ secrets.DENO_DEPLOY_TOKEN }}
2827
run: |
29-
set -euo pipefail
30-
URL="https://screenoperator-kilo-proxy.deno.dev/api/gateway/chat/completions"
28+
ORG="android-poweruser"
29+
APP="screenoperator-kilo-proxy"
30+
ENTRYPOINT="cloudflare-worker/kilo-proxy/kilo_proxy.ts"
3131
32-
for i in 1 2 3 4 5 6 7 8 9 10; do
33-
PRE=$(curl -s -o /dev/null -w '%{http_code}' -X OPTIONS "$URL" \
34-
-H "Origin: https://appassets.androidplatform.net" --max-time 20 || echo 000)
35-
POST=$(curl -s -o /dev/null -w '%{http_code}' -X POST "$URL" \
36-
-H "Content-Type: application/json" \
37-
-d '{"model":"probe","messages":[]}' --max-time 30 || echo 000)
38-
echo "attempt $i: OPTIONS=$PRE POST=$POST"
39-
if [ "$PRE" = "200" ] && [ "$POST" != "405" ] && [ "$POST" != "000" ]; then
40-
echo "Proxy is live and forwarding to api.kilo.ai."
41-
exit 0
42-
fi
43-
sleep 10
44-
done
32+
# Create app if it doesn't exist yet (idempotent)
33+
deno deploy create \
34+
--org="$ORG" \
35+
--app="$APP" \
36+
--token="$DENO_DEPLOY_TOKEN" \
37+
--source=local \
38+
--runtime-mode=dynamic \
39+
--entrypoint="$ENTRYPOINT" \
40+
--region=us 2>&1 || true
4541
46-
echo "::error::Proxy did not answer correctly (still static / unreachable)."
47-
exit 1
42+
# Deploy to production
43+
deno deploy \
44+
--org="$ORG" \
45+
--app="$APP" \
46+
--token="$DENO_DEPLOY_TOKEN" \
47+
--prod \
48+
"$ENTRYPOINT"

0 commit comments

Comments
 (0)