Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -24,3 +27,28 @@ jobs:

- name: Run tests
run: npm test

deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
concurrency:
group: deploy-production
cancel-in-progress: false
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Deploy Worker
run: npm run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Secret Scanning

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
trufflehog:
runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }}
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Secret Scanning
uses: trufflesecurity/trufflehog@7f4e37db2d928c18ddd7ddf0604f8f7d1f5793ec # v3.93.0
with:
extra_args: --results=verified,unknown
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ lerna-debug.log*

# misc
.DS_Store
.kilo
.kilo
*.sqlite
*.sqlite3
*.db
*.swp
16 changes: 13 additions & 3 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "pinchbench-api",
"account_id": "e115e769bcdd4c3d66af59d3332cb394",
"main": "src/index.ts",
"compatibility_date": "2026-02-12",
"d1_databases": [
{
"binding": "prod_pinchbench",
"database_name": "prod-pinchbench",
"database_id": "85219a08-0016-4255-bd3f-c347705f97a0",
"database_id": "e6c249ec-b2ae-4230-a1d7-17016431cabd",
"remote": true
}
],
"routes": [
{
"pattern": "api.pinchbench.com",
"custom_domain": true
}
],
"triggers": {
"crons": [
"0 3 * * *"
Expand All @@ -26,7 +33,10 @@
// Set CF_ACCESS_TEAM_DOMAIN and CF_ACCESS_AUD in Cloudflare Dashboard (Settings → Variables)
// For local development only: set CF_ACCESS_BYPASS=true via `wrangler dev --var CF_ACCESS_BYPASS:true`
"vars": {
"CF_ACCESS_BYPASS": "false"
"CF_ACCESS_BYPASS": "false",
"CF_ACCESS_TEAM_DOMAIN": "engineering-e11.cloudflareaccess.com",
"CF_ACCESS_AUD": "b71bf455da18651ded735997d7fc391bd234a7eb7a637c884aecc1ac535baa0e",
"GITHUB_CLIENT_ID": "Ov23litsCSqJuxLAb956"
}
// "compatibility_flags": [
// "nodejs_compat"
Expand Down Expand Up @@ -60,4 +70,4 @@
// "enabled": true,
// "head_sampling_rate": 1
// }
}
}
Loading