Repository navigation
70 lines (64 loc) · 2.24 KB
/
Copy pathdeploy-host.yml
File metadata and controls
70 lines (64 loc) · 2.24 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
name: Deploy Host Worker
on:
push:
branches: [main]
paths:
- 'workers/host/**'
- 'store/**'
- 'platform-docs/**'
- 'zensical.toml'
- 'scripts/clean-generated-docs.mjs'
- 'package.json'
# The console bundles @proagentstore/sdk + the coder UI at build time, so
# changes there must redeploy the console (else SDK-only fixes never go live).
- 'packages/sdk/**'
- 'agents/coder/web/**'
- '.github/workflows/deploy-host.yml'
# Same reason as deploy-api.yml: the shared build chain lives in a composite action
# (#779), so an edit there must still trigger this deploy.
- '.github/actions/build-platform/**'
- 'scripts/deploy-worker.mjs'
- 'scripts/lib/deploy-worker.mjs'
# Manual trigger — see ci.yml. A stuck push event must not mean an unshippable repo.
workflow_dispatch:
concurrency:
group: deploy-host
cancel-in-progress: true
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
# The install + build chain shared with deploy-api.yml. Must come AFTER
# pnpm/action-setup and setup-node above — the composite shells out to `pnpm`
# directly and has no setup of its own.
- uses: ./.github/actions/build-platform
- name: Deploy host worker
# Same retry policy and status as the API and MCP deploys (#1046).
id: deploy
run: node scripts/deploy-worker.mjs --cwd workers/host
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Smoke test
run: |
for i in 1 2 3 4 5; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://proagentstore.online/)
if [ "$STATUS" = "200" ]; then
echo "Host check passed"
exit 0
fi
echo "Attempt $i: got $STATUS, retrying..."
sleep 5
done
echo "Host check failed after 5 attempts"
exit 1