Skip to content

fix(ci): allow destroy without BETTER_AUTH_SECRET - #10

Merged
kattsushi merged 1 commit into
masterfrom
fix/destroy-missing-auth-secret
May 22, 2026
Merged

kattsushi merged 1 commit into
masterfrom
fix/destroy-missing-auth-secret

Conversation

@kattsushi

Copy link
Copy Markdown
Owner

Why

The preview destroy job runs pnpm nx destroy web -- --stage=... which invokes:

  • alchemy destroy apps/web/alchemy.run.ts ...

alchemy.run.ts was eagerly requiring BETTER_AUTH_SECRET at module init. CI destroy environments don’t have this secret, so the destroy step failed even though it doesn’t need auth.

What changed

  • In apps/web/alchemy.run.ts, BETTER_AUTH_SECRET is now required for deploy/preview, but treated as optional when the command is destroy (detected via process.argv).

Verification

  • pnpm run check
  • pnpm run typecheck

@kattsushi
kattsushi merged commit ae9f2f6 into master May 22, 2026
6 checks passed

This branch was previously deployed

1 inactive deployment
preview — 4391b38a Deployed May 22, 2026 by kattsushi via Destroy preview #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant