Skip to content

Commit bc23891

Browse files
committed
Replace env.PREVIEW usage with Astro env.PROD .
1 parent 6415308 commit bc23891

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/build-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: make install
3333

3434
- name: Build the website
35-
run: make build MODE=preview
35+
run: make build MODE=production
3636

3737
- name: Set up SSH key
3838
uses: webfactory/[email protected]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ check:
4343
pnpm run astro check
4444

4545
build:
46-
pnpm build
46+
pnpm run astro build --mode $(MODE)
4747

4848
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
4949
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)

src/pages/robots.txt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Allow: /
1414
Sitemap: https://ep2025.europython.eu/sitemap-index.xml
1515
`;
1616

17-
const isPreview = String(import.meta.env.PREVIEW).toLowerCase() === "true";
17+
const isPreview = import.meta.env.MODE == "preview";
1818
export const GET: APIRoute = () =>
1919
new Response(isPreview ? previewRobots : prodRobots);

0 commit comments

Comments
 (0)