forked from microbit-foundation/cctd-ml-machine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.cjs
43 lines (41 loc) · 1.04 KB
/
deployment.cjs
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
/**
* (c) 2024, Micro:bit Educational Foundation and contributors
*
* SPDX-License-Identifier: MIT
*/
const {
createDeploymentDetailsFromOptions,
} = require("@microbit-foundation/website-deploy-aws-config");
const { s3Config } = createDeploymentDetailsFromOptions({
production: {
bucket: "createai.microbit.org",
mode: "root",
allowPrerelease: false,
},
staging: {
bucket: "stage-createai.microbit.org",
},
review: {
bucket: "review-createai.microbit.org",
mode: "branch-prefix",
},
});
module.exports = {
deploymentDir: "./dist",
...s3Config,
region: "eu-west-1",
removeNonexistentObjects: true,
enableS3StaticWebsiteHosting: true,
errorDocumentKey: "index.html",
redirects: [],
params: {
"**/**.html": {
CacheControl: "public, max-age=0, must-revalidate",
},
"**/assets/**": { CacheControl: "public, max-age=31536000, immutable" },
// Just the favicon, other images via bundler/assets
"imgs/**": {
CacheControl: "public, max-age=0, must-revalidate",
},
},
};