Skip to content

Commit cf86efa

Browse files
Merge pull request #418 from kagent-dev/main
Updates from main
2 parents 1e8d68e + 9a30a19 commit cf86efa

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/production.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Production
2+
3+
# Deploys the site to PRODUCTION. `wrangler deploy` promotes the new version to
4+
# 100% live traffic. Runs on merge to main, or manually via the Actions tab. PR
5+
# builds use preview.yaml (`versions upload`) and never reach production.
6+
on:
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
# Never run two production deploys at once; do not cancel an in-flight deploy.
13+
concurrency:
14+
group: deploy-production
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20.x
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Build the site
32+
run: npm run build:worker
33+
34+
- name: Deploy to production
35+
id: deploy
36+
uses: cloudflare/wrangler-action@v3.14.1
37+
with:
38+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
39+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
40+
command: deploy --minify
41+
42+
- name: Print website URL
43+
env:
44+
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
45+
run: echo $DEPLOYMENT_URL

0 commit comments

Comments
 (0)