-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
43 lines (42 loc) · 986 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
37
38
39
40
41
42
43
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "adelfa-docs",
removal: input?.stage === "production" ? "retain" : "remove",
home: "aws",
};
},
async run() {
new sst.aws.Nextjs("AdelfaDocs", {
domain:
$app.stage === "production"
? {
name: "adelfa-prover.org",
redirects: ["www.adelfa-prover.org"],
}
: undefined,
});
},
console: {
autodeploy: {
target(event) {
// Use the `main` branch as the trigger for production deployment.
if (
event.type === "branch" &&
event.branch === "main" &&
event.action === "pushed"
) {
return {
stage: "production",
};
}
if (event.type === "pull_request") {
return {
stage: `pr-${event.number}`,
};
}
},
},
},
});