Skip to content

fix: add visible focus rings to home buttons, add mobile install scre… #24

fix: add visible focus rings to home buttons, add mobile install scre…

fix: add visible focus rings to home buttons, add mobile install scre… #24

name: Deploy (Cloudflare)
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: deploy-cloudflare-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: "24"
cache: npm
- name: Install dependencies
run: npm ci
- name: Type check
run: npm run typecheck
- name: Run tests
run: npm test
- name: Validate local D1 migrations
run: npm run db:migrate:local
- name: Validate Cloudflare credentials are configured
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
echo "::error::Missing CLOUDFLARE_API_TOKEN secret."
exit 1
fi
if [ -z "$CLOUDFLARE_ACCOUNT_ID" ]; then
echo "::error::Missing CLOUDFLARE_ACCOUNT_ID secret."
exit 1
fi
- name: Apply D1 migrations
run: npm run db:migrate:remote
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Compute app version
id: app_version
run: echo "short_sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Deploy Worker
run: npx wrangler deploy --config platforms/cloudflare/wrangler.toml --var APP_VERSION:${{ steps.app_version.outputs.short_sha }}
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}