Skip to content

Commit e5f7d48

Browse files
committed
Add Cloudflare deploy job for FDR
1 parent 8118e1f commit e5f7d48

4 files changed

Lines changed: 98 additions & 0 deletions

File tree

.github/workflows/telemetry-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,3 +580,40 @@ jobs:
580580
directory: './pecan/dist'
581581
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
582582
branch: dev
583+
584+
deploy-fdr-cloudflare:
585+
needs: [unit-tests, integration, vcan]
586+
runs-on: ubuntu-latest
587+
if: github.ref == 'refs/heads/main'
588+
permissions:
589+
contents: read
590+
deployments: write
591+
592+
steps:
593+
- name: Checkout code
594+
uses: actions/checkout@v4
595+
596+
- name: Setup Node.js
597+
uses: actions/setup-node@v4
598+
with:
599+
node-version: '20'
600+
cache: 'npm'
601+
cache-dependency-path: flight-recorder/package-lock.json
602+
603+
- name: Install dependencies
604+
working-directory: ./flight-recorder
605+
run: npm ci
606+
607+
- name: Build
608+
working-directory: ./flight-recorder
609+
run: npm run build
610+
611+
- name: Deploy to Cloudflare Pages
612+
uses: cloudflare/pages-action@v1
613+
with:
614+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
615+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
616+
projectName: 'wfr-fdr'
617+
directory: './flight-recorder/dist'
618+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
619+
branch: main

flight-recorder/tsconfig.app.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"compilerOptions": {
3+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4+
"target": "ES2022",
5+
"useDefineForClassFields": true,
6+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
7+
"module": "ESNext",
8+
"types": ["vite/client"],
9+
"skipLibCheck": true,
10+
11+
/* Bundler mode */
12+
"moduleResolution": "bundler",
13+
"allowImportingTsExtensions": true,
14+
"verbatimModuleSyntax": true,
15+
"moduleDetection": "force",
16+
"noEmit": true,
17+
"jsx": "react-jsx",
18+
19+
/* Linting */
20+
"strict": true,
21+
"noUnusedLocals": true,
22+
"noUnusedParameters": true,
23+
"erasableSyntaxOnly": true,
24+
"noFallthroughCasesInSwitch": true,
25+
"noUncheckedSideEffectImports": true
26+
},
27+
"include": ["src"]
28+
}

flight-recorder/tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files": [],
3+
"references": [
4+
{ "path": "./tsconfig.app.json" },
5+
{ "path": "./tsconfig.node.json" }
6+
]
7+
}

flight-recorder/tsconfig.node.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4+
"target": "ES2023",
5+
"lib": ["ES2023"],
6+
"module": "ESNext",
7+
"types": [],
8+
"skipLibCheck": true,
9+
10+
/* Bundler mode */
11+
"moduleResolution": "bundler",
12+
"allowImportingTsExtensions": true,
13+
"verbatimModuleSyntax": true,
14+
"moduleDetection": "force",
15+
"noEmit": true,
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"erasableSyntaxOnly": true,
22+
"noFallthroughCasesInSwitch": true,
23+
"noUncheckedSideEffectImports": true
24+
},
25+
"include": ["vite.config.ts"]
26+
}

0 commit comments

Comments
 (0)