-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
57 lines (50 loc) · 1.44 KB
/
index.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import * as pulumi from "@pulumi/pulumi";
import * as render from "@cloudyskysoftware/pulumi-render";
import { services } from "@cloudyskysoftware/pulumi-render/types/input";
const config = new pulumi.Config();
const ownerEmail = config.require("ownerEmail");
const ownerId = pulumi
.output(render.owners.listOwners())
.apply(
(result) =>
result.items.filter((i) => i.owner?.email === ownerEmail)[0].owner
?.id || ""
);
const staticSiteDetails: services.StaticSiteDetailsCreateArgs = {
buildCommand: "make render-build",
publishPath: "public",
pullRequestPreviewsEnabled: "yes",
previews: {
generation: "automatic",
},
};
const staticSite = new render.services.StaticSite(
"website",
{
name: "Cloudy Sky Software website",
ownerId,
repo: "https://github.com/cloudy-sky-software/website",
autoDeploy: "yes",
branch: "main",
serviceDetails: staticSiteDetails,
type: "static_site",
rootDir: ".",
},
{ protect: true }
);
const envVars = new render.services.EnvVarsForService("envVars", {
serviceId: staticSite.id,
envVars: [
{
key: "HUGO_VERSION",
value: "0.113.0",
},
],
});
const wwwCustomDomain = new render.services.CustomDomain(
"wwwCustomDomain",
{ name: "www.cloudysky.software", serviceId: staticSite.id },
{
protect: true,
}
);