-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathsst.config.ts
36 lines (34 loc) · 941 Bytes
/
sst.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { SSTConfig } from "sst";
import { StaticSite } from "sst/constructs";
export default {
config(_input) {
return {
name: "sst-dev",
region: "us-east-1",
};
},
stacks(app) {
app.stack(function Site({ stack }) {
const site = new StaticSite(stack, "site", {
customDomain:
stack.stage === "prod"
? {
hostedZone: "sst.dev",
domainName: "guide.sst.dev",
}
: stack.stage.startsWith("branchv")
? {
hostedZone: "archives.sst.dev",
domainName: `${stack.stage}.archives.sst.dev`,
}
: undefined,
errorPage: "404.html",
buildOutput: "_site",
buildCommand: "bundle install && bundle exec jekyll build",
});
stack.addOutputs({
Url: site.customDomainUrl || site.url,
});
});
},
} satisfies SSTConfig;