Skip to content

chore: update dependencies #6

chore: update dependencies

chore: update dependencies #6

Workflow file for this run

name: Deploy Keystatic admin Worker
on:
push:
branches: ["main"]
paths:
- "apps/admin/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- ".github/workflows/deploy-admin.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: admin-worker-production
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out trusted admin code
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up pnpm
uses: pnpm/action-setup@v6
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Type-check admin application
run: pnpm --filter @preferredai/admin typecheck
- name: Build admin Worker without deployment secrets
env:
KEYSTATIC_GITHUB_CLIENT_ID: build-placeholder
KEYSTATIC_GITHUB_CLIENT_SECRET: build-placeholder
KEYSTATIC_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
NEXT_PUBLIC_KEYSTATIC_STORAGE_KIND: github
NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG: preferredai-keystatic
run: pnpm --filter @preferredai/admin build:worker
- name: Upload Worker bundle
uses: actions/upload-artifact@v7
with:
name: admin-worker
path: |
apps/admin/.open-next
apps/admin/wrangler.jsonc
include-hidden-files: true
if-no-files-found: error
retention-days: 3
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: admin-production
url: https://admin.preferred.ai/keystatic
steps:
- name: Download Worker bundle
uses: actions/download-artifact@v8
with:
name: admin-worker
path: admin-worker
- name: Deploy editor-only Worker
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: admin-worker
packageManager: npm
wranglerVersion: 4.124.0
command: deploy --config wrangler.jsonc --keep-vars
- name: Smoke-test admin origin
shell: bash
run: |
set -euo pipefail
curl --fail --silent --show-error --location --retry 10 --retry-all-errors https://admin.preferred.ai/keystatic > /dev/null
status="$(curl --silent --output /dev/null --write-out '%{http_code}' https://admin.preferred.ai/)"
test "$status" = "307" -o "$status" = "308"