feat: Add www to cloudflare pages (#105)

Co-authored-by: --global <--global>

Add our website to cloudflare pages
This commit is contained in:
Wanjohi
2024-09-03 06:55:51 +03:00
committed by GitHub
parent 62b7a841ed
commit e2e5497c62
44 changed files with 243 additions and 47 deletions

36
infra/www.ts Normal file
View File

@@ -0,0 +1,36 @@
//Deploys the website to cloudflare pages under the domain nestri.io (redirects all requests to www.nestri.io to avoid duplicate content)
// const cloudflareAccountId = new sst.Secret("CloudflareAccountId");
export const www = new cloudflare.PagesProject("www", {
name: "nestri",
accountId: "8405b2acb6746935b975bc2cfcb5c288",
productionBranch: "main",
buildConfig: {
rootDir: "apps/www",
// buildCommand: "bun run build",
destinationDir: "dist"
},
deploymentConfigs: {
production: {
compatibilityFlags: ["nodejs_compat"]
},
preview: {
compatibilityFlags: ["nodejs_compat"]
}
},
source: {
type: "github",
config: {
owner: "nestriness",
deploymentsEnabled: true,
productionBranch: "main",
repoName: "nestri",
productionDeploymentEnabled: true,
prCommentsEnabled: true,
}
}
});
export const outputs = {
www: www.subdomain,
};