1import * as Alchemy from "alchemy";
2import * as Hetzner from "alchemy/Hetzner";
3import * as Effect from "effect/Effect";
4
5export default Alchemy.Stack(
6 "HetznerWebsiteSvelteKitExample",
7 {
8 providers: Hetzner.providers(),
9 state: Alchemy.localState(),
10 },
11 Effect.gen(function* () {
12 const site = yield* Hetzner.Website.SvelteKit("SvelteKitSite", {
13 // Only hash the files that affect the build, so unchanged sources
14 // skip the SvelteKit build (and the deploy) entirely.
15 memo: {
16 include: [
17 "src/**",
18 "static/**",
19 "package.json",
20 "vite.config.ts",
21 "tsconfig.json",
22 ],
23 },
24 env: {
25 GREETING: "Hello from SvelteKit on Hetzner!",
26 },
27 });
28
29 return {
30 url: site.url,
31 };
32 }),
33);