Skip to content

Deploy docs the way ember-primitives does (wrangler + trusted PR previews) - #20

Merged
NullVoxPopuli merged 1 commit into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:deploy-setup
Jul 20, 2026
Merged

NullVoxPopuli merged 1 commit into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:deploy-setup

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

Ports ember-primitives' deploy setup, replacing the crowdstrike-era cloudflare/pages-action@v1 job and its unconfigured UX_OSS_* secrets.

ci.yml

  • Build: Docs runs on every push/PR (so the docs build stays CI-validated, fork PRs included) and uploads docs-app/dist as an artifact.
  • Deploy: Production (main only) downloads the artifact and publishes with cloudflare/wrangler-action@v4: pages deploy --project-name=ue-form — following table's ue- project naming.

deploy-preview.yml (new)

The primitives trusted-workflow pattern for fork-safe PR preview deploys:

  • Triggered by workflow_run when CI starts (or manually by PR number via workflow_dispatch).
  • determinePR resolves the PR (including fork PRs, where pull_requests[] is empty, via head-SHA lookup).
  • Only the Build job checks out PR code — and it has no secret access beyond the default token. It installs (wyvox/action-setup-pnpm), force-builds the workspace packages (the injected-deps sync requirement from Migrate test-app to vite (ember.nvp-style), scenario-test via @embroider/try, drop TS 5.9 #18), builds the docs, and uploads the dist.
  • The deploy job never sees PR code: it downloads the artifact and pages deploy --branch=<pr-branch> for a Cloudflare branch preview; a sticky comment posts the preview URL to the PR.

What you need to do for this to light up

  1. Create the ue-form Cloudflare Pages project (direct-upload).
  2. Add CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets to this repo (same ones primitives/table use).

Until then: Build: Docs passes everywhere; Deploy: Production will fail on main pushes with an auth error (it's no longer skip-gated — silent skipping is how the old setup rotted unnoticed), and preview deploys will fail at the wrangler step. Also note deploy-preview.yml only takes effect after this merges (workflow_run reads the workflow from the default branch).

🤖 Generated with Claude Code

- ci.yml: the old publish job (cloudflare/pages-action@v1, secret-gated,
  crowdstrike-era UX_OSS_* secret names) becomes two jobs: 'Build: Docs'
  runs everywhere and uploads the dist artifact, 'Deploy: Production'
  (main only) downloads it and publishes via cloudflare/wrangler-action
  `pages deploy --project-name=ue-form` (matching table's ue- naming)
- deploy-preview.yml: trusted workflow_run-triggered preview deploys for
  PRs, ported from ember-primitives — only the Build job touches PR
  code (no secrets), the deploy job only handles the built artifact, and
  a sticky comment posts the preview URL; also manually dispatchable by
  PR number

Requires the ue-form Cloudflare Pages project plus
CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID repo secrets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NullVoxPopuli
NullVoxPopuli merged commit 920fd36 into universal-ember:main Jul 20, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants