1import * as Alchemy from "alchemy";
2import * as GCP from "alchemy/GCP";
3import * as Effect from "effect/Effect";
4
5export default Alchemy.Stack(
6 "GcpWebsiteAstroExample",
7 {
8 providers: GCP.providers(),
9 state: Alchemy.localState(),
10 },
11 Effect.gen(function* () {
12 const site = yield* GCP.Website.Astro("Astro", {
13 // Only hash the files that affect the build, so unchanged sources
14 // skip the Astro build (and the image rebuild) entirely.
15 memo: {
16 include: ["src/**", "public/**", "package.json", "astro.config.ts"],
17 },
18 env: {
19 GREETING: "Hello from Astro on Cloud Run!",
20 },
21 });
22
23 return {
24 url: site.url,
25 };
26 }),
27);