Skip to content
Merged
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
8 changes: 4 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import astroExpressiveCode from 'astro-expressive-code';
import icon from 'astro-icon';
import houston from './houston.theme.json';

/* On Cloudflare Workers Builds, WORKERS_CI_BRANCH is set to the branch name for non-production deploys */
const PREVIEW_SITE = process.env.WORKERS_CI_BRANCH
? `https://${process.env.WORKERS_CI_BRANCH}.previews.astro.build`
: undefined;
/* On Cloudflare Workers Builds, WORKERS_CI_BRANCH is set to the branch name */
const branch = process.env.WORKERS_CI_BRANCH;
const PREVIEW_SITE =
branch && branch !== 'main' ? `https://${branch}.previews.astro.build` : undefined;

// https://astro.build/config
export default defineConfig({
Expand Down