Skip to content

Commit a494304

Browse files
committed
Add Cloudflare Workers showcase site and deploy workflow
1 parent 87cafc9 commit a494304

9 files changed

Lines changed: 2875 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy to Cloudflare Workers
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: cf-deploy-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
deploy:
19+
name: Deploy MirageGate Site
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: site
24+
env:
25+
CF_SEND_TELEMETRY: "false"
26+
steps:
27+
- uses: actions/checkout@v7
28+
- uses: actions/setup-node@v7
29+
with:
30+
node-version: "24"
31+
cache: npm
32+
cache-dependency-path: site/package-lock.json
33+
- run: npm ci
34+
- name: Verify Cloudflare deployment (dry-run)
35+
run: npx cf deploy public --dry-run
36+
- name: Deploy to Cloudflare Workers
37+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
38+
run: npx cf deploy public
39+
env:
40+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
Thumbs.db
2020
.idea/
2121
.vscode/
22+
23+
# Cloudflare Workers site
24+
site/node_modules/
25+
site/.cloudflare/

‎site/cloudflare.config.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "cf/config";
2+
3+
export default defineConfig({
4+
worker: {
5+
name: "miragegate",
6+
compatibilityDate: "2026-11-28",
7+
workersDev: true,
8+
observability: {
9+
enabled: true,
10+
},
11+
},
12+
});

0 commit comments

Comments
 (0)